5

I'm debugging a file with radare2 and when I come to scanf function I want to forward input from a .txt file. In gdb I would do this by typing r < text.txt.

Is something like that possible in radare2? I've tried dc < text.txt but it seems that it's not working.

9

Always ensure you use radare2 git version.

For that purpose you can use rarun2:

For stdio check what is the tty using tty for stdin just add what file you want to add, then in your rarun2 config file:

#!/usr/bin/rarun2
stdio=/dev/pts/1
stdin=./pattern.txt

Then just r2 -d /bin/ls -e dbg.profile=bla.rr2

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.