forked from radareorg/radare2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathr2pipe.html
More file actions
35 lines (29 loc) · 770 Bytes
/
r2pipe.html
File metadata and controls
35 lines (29 loc) · 770 Bytes
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>