如何将多个输入从文件重定向到GDB中的二进制文件



我在GDB中调试的二进制文件首先要求我索取ID,然后ID是否有效,请要求第二个输入。

gef➤  run
Agent ID : 48093572 //This is the first input which the user has to enter
Login Validated
Main Menu:
1. Extraction Points
2. Request Extraction
3. Submit Report
0. Exit
Enter selection:   // This is the second input the user has to enter

如何使用'<'从文件中传递两个输入操作员。如果有一个输入,我可以做

gef➤  run < input.txt

但是上面的方法不适用于多个输入。

*注意: - GEF是GDB的插件

如果您没有找到解决方案,或者其他任何人都需要此信息,则对我有用:

gdb$ r < <(cat 1_intest.txt 2_intest.txt)

每个输入都通过纳入相应的文件的内容传递给程序。

最新更新