I have just started to do some network programming. I am using the pcap pcap.NETto get开发者_如何学编程 hold of network packets. My question is, can I extract from the "payload" part of the packet a HTTP Get or Post request? Does this mean I need to read individual bytes from the payload to detect if I have the specific protocol?
Any guides are appreciated.
Thanks.
http methods are not part of the packets - as in the first XX bytes of the packet header = method.
You will need to read the stream and do a string check. The method is usually the first part of the message so you only need a small bit of data.
精彩评论