rizinorg / rz-pipe

Access rizin via pipe from any programming language!
34 stars 11 forks source link

project save and loading #25

Closed xrkk closed 3 years ago

xrkk commented 3 years ago

I tested blow code to save and load project with rzpipe, but it Hangs.

import rzpipe

# project file "bin-ls" created in current directory
rz = rzpipe.open("/bin/ls")
rz.cmd('Ps bin-ls') 

# Another session
rz = rzpipe.open("--")
rz.cmd('Po bin-ls')  # it hangs here 
XVilka commented 3 years ago

What Rizin version and platform do you use?

wargio commented 3 years ago

if you are using dev, the -- arg has been changed to == to follow more the unix philosophy since normally when you do some_command - you are saying to read from stdin.

xrkk commented 3 years ago

What Rizin version and platform do you use?

I used rizin-v0.2.1-static-x86_64.tar.xz from Release page, run in WSLv1.

I did below test:

  1. in rizin shell, open /bin/ls and save project as binls_shell
  2. in rzpipe, open /bin/ls and save project as binls_pipe
  3. in rzpipe, try load project binls_shell/binls_pipe, both hangs.
  4. in rizin shell, open project binls_shell success but binls_pipe hangs.

@wargio I used --, because rizin cannot open == in my tested version.


Well, just tested again on Ubuntu 18.04.

4 steps same as above, but produced different result in step 3: rzpipe can load binls_pipe(still hangs when loading binls_shell)

ret2libc commented 3 years ago

I think I found the problem. Probably Po restores the value of scr.prompt, thus the rzpipe breaks . cc @thestr4ng3r

ret2libc commented 3 years ago

@xrkk I'm going to close this. It will be fixed in next release (or in dev branch, if you do use rizin from git). Thanks for reporting this bug to us!