winpcap

How to hijack all local http request and extract the url using c?

萝らか妹 提交于 2019-11-26 22:59:22
问题 What direction should I go in( libraries , documents )? UPDATE Can someone illustrate how to use winpcap to do the job? UPDATE 2 How do I verify whether a packet is an HTTP one? 回答1: If by "hijack" you meant sniff the packets then what you should do to do it with WinPcap is the following: Find the device you want to use - See WinPcap tutorial. Open a device using pcap_open // Open the device char errorBuffer[PCAP_ERRBUF_SIZE]; pcap_t *pcapDescriptor = pcap_open(source, // name of the device