WinpCap 阻止互联网访问

发布于 2024-11-26 14:56:58 字数 284 浏览 3 评论 0原文

我想阻止特定网站(如 yahoo 或 gmail 或任何其他网站)的互联网访问。我在谷歌上做了很多研究,并提出了提供数据包嗅探和操作的库。我可以读取数据包并获取服务器和客户端计算机的目标 IP 和源 IP 地址。据我与该主题相关的理解,要阻止任何 url,我需要将 FIN 数据包发送到服务器,这向服务器表明我不再需要任何数据包。所以我需要创建一个带有目标IP地址的数据包并将其发送到服务器(如雅虎等)。你能帮我解决这个问题吗?一些代码片段或解决方法,或者任何其他正确的方法来完成此任务。

对此的任何帮助将不胜感激。

谢谢

I want to block internet access for the particular website like yahoo or gmail or any other. I researched a lot on google and came up with the library which offer packet sniffing and manipulation. I can read packet and get the destination ip and source ip address of the server and the client computer. as far as my understanding related to the topic is, to block the any url i need to send the FIN packet to the server which indicates to the server that I don't want any more packets. so I need to create a packet with destination ip address and send it to the server (like yahoo etc). can you help me on this, some code snippet or way around, or any other correct approach for this task.

Any help on this would be much appreciated.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

街角迷惘 2024-12-03 14:56:58

http://www.winpcap.org/docs/docs_40_2/html/main.html

首先了解如何“跟踪”数据包、读取过滤的数据包、什么是原始 IP,然后尝试阻止/修改数据包。 WinPcap 功能强大,但可能不太容易适应。

http://www.winpcap.org/docs/docs_40_2/html/main.html

Start with understanding on how to "trace" the packets, read filtered packets, what Raw IP is and then attempt on blocking/modifiying the packets. WinPcap is powerful, but may not be easy to adapt.

情域 2024-12-03 14:56:58

我已经成功使用 http://netfiltersdk.com/ 。这是一个商业项目,但他们有一个演示版本,您可以将其用于作业。

I've used http://netfiltersdk.com/ successfully. Its a commercial project but they have a demo version which you could use for your homework.

落日海湾 2024-12-03 14:56:58

请记住,您可以对流经管道的互联网流量应用阻止规则。关键是引导所有流量通过您的管道,并且在该管道上运行的应用程序决定通过什么和阻止什么。但这里我们有 Winpcap,它用于嗅探、数据包注入、统计数据收集等,就像一个旁观者观看正在发生的事情。它不用于阻止来自互联网的数据包。

Remember you can apply your blocking rules on the Internet traffic which flows through your pipe. The key is to direct all traffic to pass through your pipe and your application which operates on that pipe decides what to pass and what to block. But here we have Winpcap which is used for sniffing, packet injection, statistics gathering e.t.c just like a spectator watching whats going on. Its not used to block a packet coming from Internet.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文