2

I have a program that waits for the user to enter a string input, how can I enter that string input while debugging my program with IDA?

1

You can use I/O redirection operators in the Process options-Parameters field:

The standard input/output/error channels can be redirected using the bash shell notations. for example: >output 2>&1

1

I have found the answer after hours of searching, it is really sad that such a great tool doesn't have this option easily enabled. anyway, you have to lunch the IDA from the terminal but you have to add

"cat |"

before it. For me, it was like this

cat | ./ida64 

and then when the program waits for the user's input, you have to go back to the terminal and supply it there.

If you want to add a file as an input you can do this

cat myfile | ./ida64 

If you know any better solution please post it here.

  • You may as well use yes then. If this above method worked you may also want to check out expect and its variants (such as pexpect). – 0xC0000022L Jul 3 at 21:52

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.