Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverse cmd in rap #4173

Closed
radare opened this issue Feb 25, 2016 · 12 comments
Closed

Reverse cmd in rap #4173

radare opened this issue Feb 25, 2016 · 12 comments
Assignees
Labels
good first issue rap Radare2 remote protocol support RDebug RIO
Milestone

Comments

@radare
Copy link
Collaborator

radare commented Feb 25, 2016

We need a way for rap servers to run commands in r2 host. something like this:

r2 <----> rap://target
> CMD(x)
< CMD(y)
> CMD|REPLY(res-y)
< CMD|REPLY(res-x)
@radare
Copy link
Collaborator Author

radare commented Feb 25, 2016

This will be useful when writing debug backends using rap://, so the io plugin can run r2 commands to change register values and stuff like that. we should slowly redesign this to support remote debuggers in a better way

@radare radare added rap Radare2 remote protocol support RIO labels Feb 25, 2016
@jarusified
Copy link

I am interested in solving this? This is my idea right now, Basically When the host is Listening for Incoming Connections, I Should use (select() or new thread) for reading from stdin and pass that to existing functions right?? (tell me if this is the right path?)

@XVilka
Copy link
Contributor

XVilka commented Mar 16, 2016

@jarusified radare2 already has it's own API to talk via the network - see libr/include/r_socket.h for API and libr/socket/*.c for implementation.

@jarusified
Copy link

@XVilka will use that. But is the overall understanding of the issue correct?

@XVilka
Copy link
Contributor

XVilka commented Mar 16, 2016

@jarusified there yes, just add the answering part.

@radare radare added this to the 0.10.2 milestone Mar 16, 2016
@radare radare added the RDebug label Mar 16, 2016
@radare
Copy link
Collaborator Author

radare commented Mar 16, 2016

you can test this by doing:

$ r2 rap://:9999

and then:

$ r2 rap://localhost:9999//bin/ls

the idea behind this issue is to review/cleanup/document the rap protocol
and add support for the server side to issue commands in the host one. This
will be easier to test/implement if done in python or nodejs, there are
already implementations of that protocol for them.

This is important because it will allow non-r2 rap servers to tell r2 which
commands to run to set flags, change register state, emulate step, etc.
Only the command packet makes sense to be bidirectional imho.

On 16 March 2016 at 16:00, Anton Kochkov [email protected] wrote:

@jarusified https://github.com/jarusified there yes, just add the
answering part.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#4173 (comment)

--pancake

@jarusified
Copy link

initial fix : radareorg/radare2-bindings#107

@radare
Copy link
Collaborator Author

radare commented Mar 22, 2016

It's good to have this fix in python, but the proper fix should be in core, are you planning to do it too?

@jarusified
Copy link

yes, i am planning to do the same.

@radare
Copy link
Collaborator Author

radare commented Mar 22, 2016

cool!

On 22 Mar 2016, at 20:24, suraj jarus [email protected] wrote:

yes, i am planning to the same.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub #4173 (comment)

@radare radare self-assigned this Mar 29, 2016
@radare radare modified the milestones: 0.10.3, 0.10.2 Apr 4, 2016
@radare
Copy link
Collaborator Author

radare commented Apr 13, 2016

ping @jarusified

@radare
Copy link
Collaborator Author

radare commented May 9, 2016

Done in master

@radare radare closed this as completed May 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue rap Radare2 remote protocol support RDebug RIO
Projects
None yet
Development

No branches or pull requests

3 participants