开发者

How to detect from raw packet if it contains a HTTP Get or Post?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜