mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-04 19:47:31 +00:00
444e7b0685
$ r2 -i doc/r2pipe.html /bin/ls
36 lines
770 B
HTML
36 lines
770 B
HTML
<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>
|