rap not adding text comments as expected
Closed this issue · 4 comments
I'm attempting to use rap protocol to add comments to a remote r2 server. The setup is:
- r2 ./binary
- =&:12345
Then in a second window (in python):
r2 = r2pipe.open("rap://127.0.0.1:12345")
r2.cmd('T test')
Oddly enough, when I do a r2.cmd('T')
in the python window, it shows the text. But when i just do T
in the r2 window, it does not show the text.
I'd like to be able to send text/other remote commands to the r2 server that update that r2 instance.
nvm that pr is unrelated.
the problem is that if you do r2pipe.open("rap://...") you are creating a new instance of r2 that talks to the remote instance instead of making a direct connection to the remote rap server in python. if you see ps you'll see 2 instances.
therefor.. when you do "T..." that runs in the local instance under r2pipe, instead of the remote. you can hack it by using the =!= or !=! commands to make r2 forward all commands to the remote io.. but ideally it will be better to make r2pipe python api handle rap:// natively instead.
or just use the http server which is more tested
Yeah, i switched to using the http server for now, so this isn't a huge deal for me. Would still probably be a good thing to implement at some point.