VB.NET阻止.exe访问互联网的简单方法

发布于 2025-01-06 05:41:08 字数 272 浏览 6 评论 0原文

有没有一种简单的方法可以做到这一点,而无需编写完整的应用程序级防火墙或使用 Windows 防火墙?

我发现这非常有趣: Winsock Injector 它禁止对选定进程使用 Windows 套接字 (winsock)。

这样的注入器可以在 VB.NET 中完成吗?它适用于所有情况吗?

我尝试了注射器,但它似乎不适用于某些应用程序,

谢谢

Is there a simple way to do this without having to programme a complete application level firewall or using Windows firewall?

I found this very interesting: Winsock Injector
It disables the use of Windows Sockets (winsock) for selected processes.

Can such an injector be done in VB.NET and does it work for everything?

I tried the injector but it doesnt seem to work for certain applications

Thanks

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

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

发布评论

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

评论(1

岁月流歌 2025-01-13 05:41:08

您可以使用代码访问安全性来防止这种情况。每个.NET Framework版本的实现有所不同,但应该有类似的方法。

http://msdn.microsoft.com/ en-us/library/4b7hy971%28v=vs.85%29.aspx

这是 WebBrowserPermission 属性的帮助文档。

http:// msdn.microsoft.com/en-us/library/system.security.permissions.webbrowserpermission%28v=vs.85%29.aspx

根据您的编辑,上述内容将不起作用。

您想要阻止计算机访问互联网,而不是阻止您正在编写的应用程序。

在这种情况下,阻止互联网访问的最简单的暴力方法是禁用网络连接本身。有关如何执行此操作的示例,请参阅此问题

You could probably use Code Access Security to prevent this. The implementations for each .NET Framework versions vary, but there should be a way similar to this.

http://msdn.microsoft.com/en-us/library/4b7hy971%28v=vs.85%29.aspx

Here is the help doc for the WebBrowserPermission attribute.

http://msdn.microsoft.com/en-us/library/system.security.permissions.webbrowserpermission%28v=vs.85%29.aspx

Based on your edits, the above won't work.

You want to block the COMPUTER's access to the internet, not the application you are writing.

The easiest brute force method to block internet access in this case would be to disable the Network Connection itself. For an example how to do this, see this question.

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