0

i'm working on a tcp listener project on c#. I'm using pcap.net for packet capture. But when i'm trying to get the http message with such command like tcp.Http.Decode(Encoding.UTF8), i get some encrypted script. I'm listening on sites that not using SSL protection. I tried tcp.Http.ToMemoryString() then decode it with UTF8 with bytes I can get the Http header properly but i cant get the HTTP message in a readable form. Any ideas how can i do it or am i missing something?

1 Answers1

1

You should use the HttpDatagram.Body property to get the body.

This would return the parsed body part of the HTTP packet.

Note though that you are parsing a single packet, so you will only get the data from that packet, which might not contain the entire HTTP response body.

brickner
  • 6,595
  • 3
  • 41
  • 54
  • i get all packets of the site, it must be a data maybe a little bit of data must be in a packet. It's looking like compressed or encoded can you help me with that? – Gökberk Açıkgöz May 23 '17 at 11:17
  • If it's not the first packet, you will have to first do TCP reconstruction and then parse the data. – brickner May 25 '17 at 10:34