使用 win32 API 阻止 Windows 桌面上的所有 url

发布于 2024-08-02 16:35:45 字数 107 浏览 2 评论 0原文

我正在尝试开发一个应用程序,它可以在 Windows 桌面应用程序上使用 win32 api 阻止所有 url。
那么是否有任何 api 或任何程序以编程方式执行,以便我可以阻止所有 url?

I am trying to develop one application which can block all urls using win32 api on windows desktop application.
So is there any api or any procedure doing programmatically so that i can block all urls?

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

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

发布评论

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

评论(3

看轻我的陪伴 2024-08-09 16:35:45

仅阻止 URL 是不可能的。如果您想确保没有人可以访问互联网,唯一的方法就是拔掉以太网电缆。 (或者任何为您提供连接的东西)原因如下:

  1. 阻止所有 DNS 解析不会阻止某人访问 http://206.132.84.265 /
  2. 阻止端口 80 和 443 不会阻止某人访问托管在非标准端口上的网站。
  3. 拒绝访问 IE 和安装任何其他软件不会阻止某人下载不需要安装的浏览器(如文本浏览器)并将其放在拇指驱动器上。
  4. 购买昂贵的防火墙来阻止 HTTP 流量将无法阻止 SSL 在非标准端口上运行。

相信我,早在高中时,我就在一个仓库里用扫描枪工作,并想出了如何用它检查电子邮件(在家里电脑的帮助下),因为互联网网关位于同一网络上。

如果您想阻止人们上网,请断开互联网连接。

It's impossible to block just URLs. If you want to make sure no one can access the internet the only way to do this would be to unplug the ethernet cable. (Or whatever is giving you connectivity) Here's why:

  1. Blocking all DNS resolution won't stop someone from accessing http://206.132.84.265/
  2. Blocking port 80 and 443 won't stop someone from accessing a web site hosted on a non-standard port.
  3. Denying access to IE and installation of any other software won't stop someone from downloading a browser that doesn't require to be installed (Like a text browser) and putting it on a thumb drive.
  4. Buying an expensive firewall that blocks HTTP traffic won't be able to stop SSL operating on a non-standard port.

Believe me, back in highschool I worked in a warehouse with a scanner gun and figured out how I could check my email with it (with a little help from my computer at home) since an internet gateway was on the same network.

If you want to block people from surfing the web, disconnect the internet.

狼性发作 2024-08-09 16:35:45

我想您可以使用 Windows 防火墙 API

http://msdn.microsoft .com/en-us/library/Aa366453.aspx

I suppose you can do it using the Windows Firewall API

http://msdn.microsoft.com/en-us/library/Aa366453.aspx

牵你的手,一向走下去 2024-08-09 16:35:45

您可以使用 Windows 防火墙协议来执行此操作。这是微软提供的API。

对于 Vista,这很简单,但对于 XP,您需要做一些解决办法,因为没有可用的示例。

You can do this using Windows Firewall Protocol. This is an API provided by Microsoft.

For Vista it's straight-forward, but for XP you need to do some work around, as examples are not available for that.

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