【问题标题】:Edit HTTP header prior to forwarding在转发之前编辑 HTTP 标头
【发布时间】:2014-11-27 20:51:04
【问题描述】:

我想创建一个 python 程序,在中间人攻击中转发之前编辑 HTTP 消息的标头。

我在/proc/sys/net/ipv4/ip_forward 中允许端口转发

我正在使用arpspoof 进行 ARP 欺骗

我是否可以在用 python 重新传输标头之前对其进行编辑,或者我是否需要在应用层下方使用 C 构建的套接字?

【问题讨论】:

    标签: python http python-2.7 network-programming arp


    【解决方案1】:

    为什么不在 python 中使用套接字?

    https://docs.python.org/release/2.5.2/lib/socket-example.html

    或者只是一个 python HTTP 服务器,你让它作为代理运行。您阅读 HTTP 请求,根据需要修改标头并重新发送。

    https://docs.python.org/3.3/library/http.server.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-09-20
      • 1970-01-01
      • 2015-04-30
      • 1970-01-01
      • 1970-01-01
      • 2018-07-25
      • 2015-02-28
      相关资源
      最近更新 更多