radareorg / radare2-r2pipe

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

r2pipe Python returns empty string #74

Closed Wenzel closed 5 years ago

Wenzel commented 6 years ago

Hi,

I have a case here where I use r2pipe to script a debugger plugin for radare2 https://github.com/Wenzel/r2vmi/blob/master/examples/watch_syscall.py

What my script is doing:

r2 = r2pipe.open(r2_url, ["-d", "-2"])
r2.cmd('db {}'.format(hex(syscall_addr)))
r2.cmd('dc')
registers = r2.cmdj('drj')
...

The problem i'm facing, is that sometimes the drj command fails because the JSON returned is invalid.

By investigating a bit the problem, i spawned an IPython shell right after r2.cmd('db {}'.format(hex(syscall_addr))), and i observed this behavior:

empty_string

So sometimes r2pipe is not getting the right command output.

Any ideas ? Thanks.

Wenzel commented 6 years ago

It may be related to #54.

radare commented 5 years ago

still?

Wenzel commented 5 years ago

@radare I'm not working on this anymore, so I can't tell if the is still there. You can close the issue if you want.