Add doc/r2theme.html tool
This commit is contained in:
parent
5025aca6f6
commit
9cbd386d2e
|
@ -0,0 +1,153 @@
|
|||
<html>
|
||||
<head>
|
||||
<style>
|
||||
.b0xff { color: red; }
|
||||
.b0x00 { color: yellow; }
|
||||
.b0x7f { color: orange; }
|
||||
.other { color: #f07; }
|
||||
.offset { color: yellow ; }
|
||||
.other { color: blue; }
|
||||
.push { color: green; }
|
||||
.cjmp { color: #ff0; }
|
||||
.call { color: #f0f; }
|
||||
h3 {
|
||||
color: white;
|
||||
font-family: Verdana;
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
spacing:0px;
|
||||
}
|
||||
body { background-color:#202020; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table style=width:100%>
|
||||
<tr>
|
||||
<td width="100%" valign=top>
|
||||
<h3>r2 theme editor</h3>
|
||||
<div style='overflow:hidden'>
|
||||
<pre>
|
||||
<font class='prompt'>[0x000027ba]> </font> <font style='color:#f0f0f0'>pd 42</font>
|
||||
<font class='fline'>/</font> <font class='fname'>(fcn) entry0 1495</font>
|
||||
<font class='fline'>|</font> <font class='flow'> </font><font class='offset'>0x000027ba</font> <font class='cjmp'>41<font class='cjmp'>54</font> </font><font class='push'>push<font class='reg'> r12</font></font>
|
||||
<font class='fline'>|</font> <font class='flow'> </font><font class='offset'>0x000027bb</font> <font class='cjmp'>58</font> </font><font class='pop'>pop<font class='reg'> rax</font></font>
|
||||
<font class='fline'>|</font> <font class='flow'> </font><font class='offset'>0x000027bc</font> <font class='cjmp'>53</font> </font><font class='push'>push<font class='reg'> rbx</font></font>
|
||||
<font class='fline'>|</font> <font class='flow'> </font><font class='offset'>0x000027bd</font> <font class='cjmp'>48<font class='other'>81<font class='other'>ec<font class='cjmp'>48<font class='other'>06<font class='other'>0.</font> </font><font class='other'>sub<font class='reg'> rsp</font>,<font class='b0xff'><font class='b0xff'> <font class='push'>0x648</font></font>
|
||||
<font class='fline'>|</font> <font class='flow'> </font><font class='offset'>0x000027c4</font> <font class='cjmp'>49<font class='other'>89<font class='other'>f5</font> </font><font class='mov'>mov<font class='reg'> r13</font>,<font class='b0xff'><font class='reg'> rsi</font></font>
|
||||
<font class='fline'>|</font> <font class='flow'> </font><font class='offset'>0x000027c7</font> <font class='other'>89<font class='other'>bd<font class='other'>b0<font class='other'>f9<font class='b0xff'>ff<font class='b0xff'>ff</font> </font><font class='mov'>mov<font class='b0xff'> </font>[<font class='b0xff'>rbp</font>-<font class='b0xff'><font class='push'>0x650</font>]<font class='b0xff'></font>,<font class='b0xff'><font class='reg'> edi</font></font>
|
||||
<font class='fline'>|</font> <font class='comment'> ; jaja</font>
|
||||
<font class='fline'>|</font> <font class='flow'> </font><font class='offset'>0x000027cd</font> <font class='cjmp'>48<font class='other'>8d<font class='other'>85<font class='other'>c0<font class='other'>f9<font class='other'>f.</font> </font><font class='push'>lea<font class='reg'> rax</font>,<font class='b0xff'><font class='b0xff'> </font>[<font class='b0xff'>rbp</font>-<font class='b0xff'><font class='push'>0x640</font>]<font class='b0xff'></font></font>
|
||||
<font class='fline'>|</font> <font class='flow'> </font><font class='offset'>0x000027d4</font> <font class='cjmp'>48<font class='other'>89<font class='other'>85<font class='other'>b8<font class='other'>f9<font class='other'>f.</font> </font><font class='mov'>mov<font class='b0xff'> </font>[<font class='b0xff'>rbp</font>-<font class='b0xff'><font class='push'>0x648</font>]<font class='b0xff'></font>,<font class='b0xff'><font class='reg'> rax</font></font>
|
||||
<font class='fline'>|</font> <font class='flow'> </font><font class='offset'>0x000027db</font> <font class='other'>85<font class='b0xff'>ff</font> </font><font class='b0x00'>test<font class='reg'> edi</font>,<font class='b0xff'><font class='reg'> edi</font></font>
|
||||
<font class='fline'>|</font> <font class='flow'> ,=< </font><font class='offset'>0x000027dd</font> <font class='b0x7f'>7f<font class='other'>05</font> </font><font class='cjmp'>jg 0x27e4</font>
|
||||
<font class='fline'>|</font> <font class='flow'> | </font><font class='offset'>0x000027df</font> <font class='other'>e8<font class='other'>b1<font class='cjmp'>30<font class='b0x00'>00<font class='b0x00'>00</font> </font><font class='call'>call 0x5895</font>
|
||||
<font class='fline'>|</font><font class='b0xff'> </font><font class='flow'> | </font> 0x00005895(unk, unk) ; entry0</font>
|
||||
<font class='fline'>|</font> <font class='flow'> `-> </font><font class='offset'>0x000027e4</font> <font class='cjmp'>48<font class='other'>8d<font class='cjmp'>35<font class='other'>1d<font class='cjmp'>37<font class='other'>0.</font> </font><font class='push'>lea<font class='reg'> rsi</font>,<font class='b0xff'><font class='b0xff'> </font>[<font class='b0xff'>rip</font>+<font class='b0xff'><font class='push'>0x371d</font>]<font class='b0xff'></font></font> ; 0x00005f08
|
||||
<font class='fline'>|</font> <font class='flow'> </font><font class='offset'>0x000027eb</font> <font class='cjmp'>31<font class='b0xff'>ff</font> </font><font class='math'>xor<font class='reg'> edi</font>,<font class='b0xff'><font class='reg'> edi</font></font>
|
||||
<font class='fline'>|</font> <font class='flow'> </font><font class='offset'>0x000027ed</font> <font class='other'>e8<font class='cjmp'>2e<font class='cjmp'>32<font class='b0x00'>00<font class='b0x00'>00</font> </font><font class='call'>call sym.imp.setlocale</font>
|
||||
<font class='fline'>|</font><font class='b0xff'> </font><font class='flow'> </font> 0x00005a20() ; sym.imp.setlocale</font>
|
||||
<font class='fline'>|</font> <font class='flow'> </font><font class='offset'>0x000027f2</font> <font class='other'>bb<font class='other'>01<font class='b0x00'>00<font class='b0x00'>00<font class='b0x00'>00</font> </font><font class='mov'>mov<font class='reg'> ebx</font>,<font class='b0xff'><font class='b0xff'> <font class='push'>0x1</font></font> ; 0x00000001
|
||||
<font class='fline'>|</font> <font class='flow'> </font><font class='offset'>0x000027f7</font> <font class='other'>bf<font class='other'>01<font class='b0x00'>00<font class='b0x00'>00<font class='b0x00'>00</font> </font><font class='mov'>mov<font class='reg'> edi</font>,<font class='b0xff'><font class='b0xff'> <font class='push'>0x1</font></font> ; 0x00000001
|
||||
<font class='fline'>|</font> <font class='flow'> </font><font class='offset'>0x000027fc</font> <font class='other'>e8<font class='other'>cb<font class='cjmp'>31<font class='b0x00'>00<font class='b0x00'>00</font> </font><font class='call'>call sym.imp.isatty</font>
|
||||
<font class='fline'>|</font><font class='b0xff'> </font><font class='flow'> </font> 0x000059cc() ; sym.imp.isatty</font>
|
||||
<font class='fline'>|</font> <font class='flow'> </font><font class='offset'>0x00002801</font> <font class='other'>85<font class='other'>c0</font> </font><font class='b0x00'>test<font class='reg'> eax</font>,<font class='b0xff'><font class='reg'> eax</font></font>
|
||||
<font class='fline'>|</font> <font class='flow'> ,==< </font><font class='offset'>0x00002803</font> <font class='cjmp'>74<font class='cjmp'>60</font> </font><font class='cjmp'>je 0x2865</font>
|
||||
<font class='fline'>|</font> <font class='flow'> | </font><font class='offset'>0x00002805</font> <font class='other'>c7<font class='other'>05<font class='cjmp'>59<font class='cjmp'>3e<font class='b0x00'>00<font class='other'>0.</font> </font><font class='mov'>mov dword<font class='b0xff'> </font>[<font class='b0xff'>rip</font>+<font class='b0xff'><font class='push'>0x3e59</font>]<font class='b0xff'></font>,<font class='b0xff'><font class='b0xff'> <font class='push'>0x50</font></font> ; "P" ; 0x00000050
|
||||
<font class='fline'>|</font> <font class='flow'> | </font><font class='offset'>0x0000280f</font> <font class='cjmp'>48<font class='other'>8d<font class='cjmp'>3d<font class='other'>f3<font class='cjmp'>36<font class='other'>0.</font> </font><font class='push'>lea<font class='reg'> rdi</font>,<font class='b0xff'><font class='b0xff'> </font>[<font class='b0xff'>rip</font>+<font class='b0xff'><font class='push'>0x36f3</font>]<font class='b0xff'></font></font> ; 0x00005f09
|
||||
<font class='fline'>|</font> <font class='flow'> | </font><font class='offset'>0x00002816</font> <font class='other'>e8<font class='cjmp'>7b<font class='cjmp'>31<font class='b0x00'>00<font class='b0x00'>00</font> </font><font class='call'>call sym.imp.getenv</font>
|
||||
<font class='fline'>|</font><font class='b0xff'> </font><font class='flow'> | </font> 0x00005996() ; sym.imp.getenv</font>
|
||||
<font class='fline'>|</font> <font class='flow'> | </font><font class='offset'>0x0000281b</font> <font class='cjmp'>48<font class='other'>85<font class='other'>c0</font> </font><font class='b0x00'>test<font class='reg'> rax</font>,<font class='b0xff'><font class='reg'> rax</font></font>
|
||||
<font class='fline'>|</font> <font class='flow'> ,===< </font><font class='offset'>0x0000281e</font> <font class='cjmp'>74<font class='other'>0f</font> </font><font class='cjmp'>je 0x282f</font>
|
||||
<font class='fline'>|</font> <font class='flow'> || </font><font class='offset'>0x00002820</font> <font class='other'>80<font class='cjmp'>38<font class='b0x00'>00</font> </font><font class='cmp'>cmp byte<font class='b0xff'> </font>[<font class='b0xff'>rax</font>]<font class='b0xff'></font>,<font class='b0xff'><font class='b0xff'> <font class='push'>0x0</font></font>
|
||||
<font class='fline'>|</font> <font class='flow'> ,====< </font><font class='offset'>0x00002823</font> <font class='cjmp'>74<font class='other'>0a</font> </font><font class='cjmp'>je 0x282f</font>
|
||||
<font class='fline'>|</font> <font class='flow'> ||| </font><font class='offset'>0x00002825</font> <font class='cjmp'>48<font class='other'>89<font class='other'>c7</font> </font><font class='mov'>mov<font class='reg'> rdi</font>,<font class='b0xff'><font class='reg'> rax</font></font>
|
||||
<font class='fline'>|</font> <font class='flow'> ||| </font><font class='offset'>0x00002828</font> <font class='other'>e8<font class='other'>0f<font class='cjmp'>31<font class='b0x00'>00<font class='b0x00'>00</font> </font><font class='call'>call sym.imp.atoi</font>
|
||||
<font class='fline'>|</font><font class='b0xff'> </font><font class='flow'> ||| </font> 0x0000593c() ; sym.imp.atoi</font>
|
||||
<font class='fline'>|</font> <font class='flow'> ,=====< </font><font class='offset'>0x0000282d</font> <font class='other'>eb<font class='cjmp'>22</font> </font><font class='jmp'>jmp 0x2851</font>
|
||||
<font class='fline'>|</font> <font class='flow'> |``---> </font><font class='offset'>0x0000282f</font> <font class='cjmp'>48<font class='other'>8d<font class='cjmp'>55<font class='other'>d0</font> </font><font class='push'>lea<font class='reg'> rdx</font>,<font class='b0xff'><font class='b0xff'> </font>[<font class='b0xff'>rbp</font>-<font class='b0xff'><font class='push'>0x30</font>]<font class='b0xff'></font></font>
|
||||
<font class='fline'>|</font> <font class='flow'> | | </font><font class='offset'>0x00002833</font> <font class='other'>bf<font class='other'>01<font class='b0x00'>00<font class='b0x00'>00<font class='b0x00'>00</font> </font><font class='mov'>mov<font class='reg'> edi</font>,<font class='b0xff'><font class='b0xff'> <font class='push'>0x1</font></font> ; 0x00000001
|
||||
<font class='fline'>|</font> <font class='flow'> | | </font><font class='offset'>0x00002838</font> <font class='other'>be<font class='cjmp'>68<font class='cjmp'>74<font class='other'>08<font class='cjmp'>40</font> </font><font class='mov'>mov<font class='reg'> esi</font>,<font class='b0xff'><font class='b0xff'> <font class='push'>0x40087468</font></font> ; 0x40087468
|
||||
<font class='fline'>|</font> <font class='flow'> | | </font><font class='offset'>0x0000283d</font> <font class='cjmp'>30<font class='other'>c0</font> </font><font class='math'>xor<font class='reg'> al</font>,<font class='b0xff'><font class='reg'> al</font></font>
|
||||
<font class='fline'>|</font> <font class='flow'> | | </font><font class='offset'>0x0000283f</font> <font class='other'>e8<font class='other'>82<font class='cjmp'>31<font class='b0x00'>00<font class='b0x00'>00</font> </font><font class='call'>call sym.imp.ioctl</font>
|
||||
<font class='fline'>|</font><font class='b0xff'> </font><font class='flow'> | | </font> 0x000059c6() ; sym.imp.ioctl</font>
|
||||
<font class='fline'>|</font> <font class='flow'> | | </font><font class='offset'>0x00002844</font> <font class='other'>83<font class='other'>f8<font class='b0xff'>ff</font> </font><font class='cmp'>cmp<font class='reg'> eax</font>,<font class='b0xff'><font class='b0xff'> <font class='push'>0xffffffff</font></font>
|
||||
<font class='fline'>|</font> <font class='flow'> ,======< </font><font class='offset'>0x00002847</font> <font class='cjmp'>74<font class='other'>0e</font> </font><font class='cjmp'>je 0x2857</font>
|
||||
<font class='fline'>|</font> <font class='flow'> || | </font><font class='offset'>0x00002849</font> <font class='other'>0f<font class='other'>b7<font class='cjmp'>45<font class='other'>d2</font> </font><font class='other'>movzx<font class='reg'> eax</font>,<font class='b0xff'> word<font class='b0xff'> </font>[<font class='b0xff'>rbp</font>-<font class='b0xff'><font class='push'>0x2e</font>]<font class='b0xff'></font></font>
|
||||
<font class='fline'>|</font> <font class='flow'> || | </font><font class='offset'>0x0000284d</font> <font class='other'>85<font class='other'>c0</font> </font><font class='b0x00'>test<font class='reg'> eax</font>,<font class='b0xff'><font class='reg'> eax</font></font>
|
||||
<font class='fline'>|</font> <font class='flow'>,=======< </font><font class='offset'>0x0000284f</font> <font class='cjmp'>74<font class='other'>06</font> </font><font class='cjmp'>je 0x2857</font>
|
||||
<font class='fline'>|</font> <font class='flow'>||`-----> </font><font class='offset'>0x00002851</font> <font class='other'>89<font class='other'>05<font class='other'>11<font class='cjmp'>3e<font class='b0x00'>00<font class='b0x00'>00</font> </font><font class='mov'>mov<font class='b0xff'> </font>[<font class='b0xff'>rip</font>+<font class='b0xff'><font class='push'>0x3e11</font>]<font class='b0xff'></font>,<font class='b0xff'><font class='reg'> eax</font></font>
|
||||
<font class='fline'>|</font> <font class='flow'>``------> </font><font class='offset'>0x00002857</font> <font class='other'>c7<font class='other'>05<font class='cjmp'>7b<font class='cjmp'>41<font class='b0x00'>00<font class='other'>0.</font> </font><font class='mov'>mov dword<font class='b0xff'> </font>[<font class='b0xff'>rip</font>+<font class='b0xff'><font class='push'>0x417b</font>]<font class='b0xff'></font>,<font class='b0xff'><font class='b0xff'> <font class='push'>0x1</font></font> ; 0x00000001
|
||||
<font class='fline'>|</font> <font class='flow'> | </font><font class='offset'>0x00002861</font> <font class='cjmp'>31<font class='other'>db</font> </font><font class='math'>xor<font class='reg'> ebx</font>,<font class='b0xff'><font class='reg'> ebx</font></font>
|
||||
<font class='fline'>|</font> <font class='flow'> | </font><font class='offset'>0x00002863</font> <font class='other'>eb<font class='other'>1f</font> </font><font class='jmp'>jmp 0x2884</font>
|
||||
</pre>
|
||||
</div>
|
||||
</td>
|
||||
<td valign=top style='height:100%'>
|
||||
<textarea id='profile' style='height:100%'>
|
||||
ec comment rgb:dd2
|
||||
ec fname rgb:7d7
|
||||
ec fline rgb:fd7
|
||||
ec flag rgb:557
|
||||
ec label rgb:ffd
|
||||
ec flow rgb:fa2
|
||||
ec prompt rgb:d52
|
||||
ec offset rgb:5df
|
||||
ec input rgb:a52
|
||||
ec other rgb:5a7
|
||||
ec b0x00 rgb:a52
|
||||
ec b0x7f rgb:522
|
||||
ec b0xff rgb:a2a
|
||||
ec math rgb:755
|
||||
ec bin rgb:f75
|
||||
ec btext rgb:5df
|
||||
ec push rgb:dad
|
||||
ec pop rgb:555
|
||||
ec jmp rgb:22d
|
||||
ec cjmp rgb:552
|
||||
ec call rgb:275
|
||||
ec nop rgb:d55
|
||||
ec ret rgb:777
|
||||
ec trap rgb:5da
|
||||
ec swi rgb:2dd
|
||||
ec cmp rgb:d7d
|
||||
ec reg rgb:5dd
|
||||
ec num rgb:7d7
|
||||
ec mov rgb:f72
|
||||
</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<script>
|
||||
function setColor(X,Y) {
|
||||
/* radare to html rgb syntax */
|
||||
try {
|
||||
if (Y.substr(0,4)=='rgb:') {
|
||||
var rgb = '#';
|
||||
rgb+=Y[4]; rgb+=Y[4];
|
||||
rgb+=Y[5]; rgb+=Y[5];
|
||||
rgb+=Y[6]; rgb+=Y[6];
|
||||
Y = rgb;
|
||||
}
|
||||
var x = document.getElementsByClassName (X);
|
||||
for (var i in x) { try { x[i].style.color=Y;}catch(e) {} }
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
|
||||
function updateProfile() {
|
||||
var txt = document.getElementById('profile').value;
|
||||
var lines = txt.replace(/ec\ /g,'').split("\n")
|
||||
for (row in lines) {
|
||||
var kv = lines[row].split(' ')
|
||||
setColor(kv[0],kv[1]);
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('profile').onkeyup = function() {
|
||||
updateProfile();
|
||||
}
|
||||
updateProfile();
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue