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

后端 未结 4 1647
无人共我
无人共我 2020-12-05 16:52

What direction should I go in(libraries, documents)?

UPDATE

Can someone illustrate how to use winpcap to do the job?

4条回答
  •  春和景丽
    2020-12-05 17:22

    It may sound like overkill but the Web proxy/cache server Squid does exactly that. A few years ago my company used it and I had to tweak the code locally to provide some special warnings when certain URLs were accessed so I know it can do what you want. You just need to find the code you want and pull it out for your project. I used version 2.X and I see they're up to 3.X now but I suspect that aspect of the code hasn't changed much internally.

    You didn't say if windows is a 'requirement' or a 'preference' but according to the site: http://www.squid-cache.org/ they can do both.

提交回复
热议问题