I can quickly test hex string arguments in gdb like this:

r $'\x61\x61\x61\x61'

I'd like to do something similar in radare2 but all I can figure out is regular strings:

doo aaaa

I tried this but the argument isn't interpreted as a hex string

doo $'\x61\x61\x61\x61'

How can I format a hex string argument and pass it to doo?


There most be a better way than the one I going to show you but this is how I do it:

I make a rarun2 profile. I'm going to call it "tmp.rr2" and it will contain this:


Note: arguments from arg1..arg[N]

Then in the command line type:

 $ r2 -r tmp.rr2 -d crackme02

Note: You can update the file and run ood/doo

UPDATE: I found a better way so you don't have to make a rarun2 profile:
Run r2 as normal and type:

> dor arg1=\x6f\x60\x72\x72\x76\x6e
> doo
  • +1. the rarun2 profile works! the dor + doo combo isn't working for me. – hextagonal Apr 16 at 0:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.