radareorg/radare2-r2pipe

r2pipe doesn't handle ASM searching well of patterns.

jcook-bb opened this issue · 1 comments

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")

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

  • r2.cmdj("/adj push\;push")
  • r2.cmdj(""/adj push;push"")