radareorg / radare2-r2pipe

Access radare2 via pipe from any programming language!
390 stars 99 forks source link

r2pipe doesn't handle ASM searching well of patterns. #149

Closed jcook-bb closed 2 years ago

jcook-bb commented 2 years ago

radare2 will work for the following [0x000010d0]> "/adj push;push" [{"offset":4316,"len":2,"code":"push eax; push esp"},{"offset":4317,"len":2,"code":"push esp; push edx"},{"offset":4343,"len":2,"code":"push eax; push ecx"}}]

However r2pipe doesn't seem to handle this.

r2.cmdj("/adj push;push") r2pipe.cmdj.Error: Extra data: line 2 column 1 (char 3255)

Any ideas on a work around? r2pipe works for single search r2.cmdj("/adj push")

trufae commented 2 years ago

thats an expected result as the ; is a special caracter used to separate commands and you can run multiple commands at once. in the r2 shell you need to quote the whole command, so you must do the same when using it via r2pipe, pick the one you like more: escaping the colon or quoting the whole thing