P
P
PetrSemenov2016-12-02 09:11:23
Computer networks
PetrSemenov, 2016-12-02 09:11:23

How to sniff http c++?

Good afternoon! Tell me how to write an http sniffer in visual studio c ++? It seems possible through a proxy, no one can throw off an example? I tried to do it on pcap, but it's too low-level for me, I didn't figure out how to parse packets. I will be grateful. Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
anikavoi, 2016-12-03
@anikavoi

Dear, you already decide what you need: Sniffer or Logging proxy.
If the first, then without PCUP you will not leave anywhere, but the second is written by any student in half an hour.
The proxy hangs on the port and waits for a connection, receives an HTTP header over the connection and looks where the client wanted to connect, connects there and pushes the same header. Then everything is simple - we shove everything that comes from the client into the second socket, everything that the WEB server answers - we shove it into the first one. On the way, we write everything that passes to a file.
Plenty of examples on google.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question