Reconstructing data from PCAP sniff

前端 未结 5 1319
挽巷
挽巷 2021-02-01 09:40

I am trying to sniff HTTP data through libpcap and get all the http contents (header+payload) after processing the TCP payload.

As per my discussion at Writing an http s

5条回答
  •  借酒劲吻你
    2021-02-01 09:44

    Rather than reassemble the streams youself, you can use tcptrace to reassemble the pcap file. I believe -e will do it.

    Once you have the application-layer data in one piece, you can apply simple HTTP header parsing.... Perhps from a library such as http://github.com/ry/http-parser

提交回复
热议问题