File: r2pipe.html

package info (click to toggle)
radare2 6.0.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 77,536 kB
  • sloc: ansic: 889,435; sh: 8,299; javascript: 7,675; makefile: 5,194; python: 1,929; cpp: 789; perl: 438; lisp: 122; sed: 85; asm: 57; cs: 37; xml: 32; ruby: 29; java: 21
file content (35 lines) | stat: -rw-r--r-- 770 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<html>

<body>
Hello World
<button type="button" id="buttonInfo">Info</button>
<button type="button" id="buttonFlags">Flags</button>
<div id="urls">Starting up...</div>
</body>


<script type="application/javascript" src="/m/r2.js">
</script>
<script>

r2.id=(x) => document.getElementById(x);
r2.onload=(x) => document.addEventListener('DOMContentLoaded', x);

function main() {
	const urls = r2.id('urls');
	r2.id('buttonInfo').addEventListener('click', () => {
		r2.cmd('i', function(res) {
			urls.innerHTML = '<pre>' + res + '</pre>';
		});
	});
	r2.id('buttonFlags').addEventListener('click', () => {
		r2.cmd('f', function(res) {
			urls.innerHTML = '<pre>' + res + '</pre>';
		});
	});
	urls.innerHTML = 'Press any button';
}
r2.onload(main);
</script>

</html>