I'm using GDB to do some reverse engineering of a basic C program. The program does not accept command line input. It does accept input from standard in during run time. I'm trying to script the standard in by doing
run < temp
Where temp is a file containing something like
1
0
AAAAAAAAA
AAAAA
0
Unfortunately, when I do this, GDB appears to loop infinitely over this programs input.
I tried to make this file using python
python -c 'print "AAAAA"' > temp
And with the solution presented here: How to debug a program that takes user input from stdin with GDB?
But no luck. When I just step through the program with GDB, I can pass input via standard in and that work's just fine.
I'm a bit stumped...