开发者

How to detect which TCP packets are part of a HTTP connection in C#? [duplicate]

开发者 https://www.devze.com 2023-01-15 16:42 出处:网络
This question already has answers here: HTTP packet reconstruction (6 answers) Closed 8 years ago. I am working on url tracker project where I have to track all sites visited by a user.
This question already has answers here: HTTP packet reconstruction (6 answers) Closed 8 years ago.

I am working on url tracker project where I have to track all sites visited by a user. So I deci开发者_如何学运维ded to do it by tracking TCP packets on every user request. So I am capturing all the TCP packets user requesting. But how can I figure out if it is a normal TCP request or HTTP request. Any suggestion will be very helpful. Thanks.


I would suggest that running an HTTP proxy would be a better way of doing this. That way the browser (or anything else wanting to make HTTP requests) will know to use your application, and other applications won't be affected.


You would have to inspect the request for a HTTP message such as GET /images/logo.png HTTP/1.1, and then you need to observe a response to make sure it actually succeeded.

0

精彩评论

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