【问题标题】:How to redirect multiple inputs from files to a binary being debugged in gdb?如何将文件中的多个输入重定向到 gdb 中正在调试的二进制文件?
【发布时间】:2017-12-13 09:29:18
【问题描述】:

我在 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 的一个插件

【问题讨论】:

    标签: linux gcc gdb buffer-overflow exploit


    【解决方案1】:

    如果您还没有找到解决方案,或者其他人需要这些信息,这对我有用:

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

    每个输入都通过对相应文件的内容进行分类来传递给程序。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多