radareorg / radare2

UNIX-like reverse engineering framework and command-line toolset
https://www.radare.org/
GNU Lesser General Public License v3.0
20.73k stars 3.01k forks source link

Ability to pass arguments to r2pipe script #4721

Open XVilka opened 8 years ago

XVilka commented 8 years ago

To be able pass arguments too when script is called using "." command:

[0x0000000]> . some_script.py argument1 argument2
radare commented 8 years ago

You dont want to run r2pipe scripts like this

Use #!pipe python script.py args

On 26 Apr 2016, at 22:23, Anton Kochkov notifications@github.com wrote:

To be able pass arguments too when script is called using "." command:

[0x0000000]> . some_script.py argument1 argument2 — You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub

radare commented 8 years ago

Oh well this is a shortcut to do the same.. Should be done here too

On 26 Apr 2016, at 22:23, Anton Kochkov notifications@github.com wrote:

To be able pass arguments too when script is called using "." command:

[0x0000000]> . some_script.py argument1 argument2 — You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub

NishantPuri99 commented 3 years ago

I have a fair hold on Python, can I perhaps try this out? Thanks

trufae commented 3 years ago

I dont think it makes sense to pass arguments when using the . Command because its used to interpret a file.

when using #!pipe python foo.py foo bar it is possible to pass arguments already.

the other way we can use the % command to set the environment for example