Closed bannsec closed 6 years ago
How is this simplifying? How is the user suppose to guess that -d comes after the ./prog AAABBB??? looks clearly harder to me.
This would simplify:
r2 = r2pipe.open(["-d","AAABBB"])
or
r2 = r2.debug(["AAABBB"])
That works too. At present, when I attempted the above -d with args after it r2 got confused and attempted to debug my arguments.
You can do that already. I dont see what to simplify here
On 1 Sep 2018, at 07:34, bannsec notifications@github.com wrote:
The current way to pass command-line parameters to a program using r2pipe appears to be:
r2 = r2pipe.open("./prog", ["-d", 'rarun2', 'program=prog', 'arg1=AAABBB']) However, via the command line you can do:
r2 -d ./prog AAABBB It would be very handy to be able to do something simpler via python commands, such as:
r2 = r2pipe.open(["./prog","AAABBB"],["-d"]) — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Couple things. The method you mentioned of putting args after doesn't work. I assumed it was intentional but perhaps is a bug?
Two, changing the open to an optional list is actually logical. When you open a process for running, you populate argv. Most run commands (such as subprocess and pwntools) expose an option to specify arguments for the application you're opening in the same way as you would run it. The second list of arguments is for radare, not for the application itself. Adding the first argument as a list would follow common calling conventions.
If it doesnt work isa bug
On 1 Sep 2018, at 10:21, bannsec notifications@github.com wrote:
Couple things. The method you mentioned of putting args after doesn't work. I assumed it was intentional but perhaps is a bug?
Two, changing the open to an optional list is actually logical. When you open a process for running, you populate argv. Most run commands (such as subprocess and pwntools) expose an option to specify arguments for the application you're opening in the same way as you would run it. The second list of arguments is for radare, not for the application itself. Adding the first argument as a list would follow common calling conventions.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Moved over the r2pipe repo - https://github.com/radare/radare2-r2pipe/issues/71
The current way to pass command-line parameters to a program using r2pipe appears to be:
However, via the command line you can do:
It would be very handy to be able to do something simpler via python commands, such as: