Windows DNS 挂钩

发布于 2024-08-02 04:34:45 字数 84 浏览 1 评论 0原文

Windows 如何解析 DNS 以及如何拦截调用以注入我自己的域? 我在应用程序中需要这个,并且运行我自己的 DNS 服务器或修改主机文件不是解决方案。

How does Windows resolve DNS and how can I intercept the calls, in order to inject my own domains?
I need this in an application, and running my own DNS server or modifying the hosts file is not a solution.

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

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

发布评论

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

评论(2

遇见了你 2024-08-09 04:34:45

我不确定你的目的是什么,但有几种选择。
CodeProject 包含一些可能对您有所帮助的内容。它似乎做了你需要做的事情。
现在,另一个解决方案可能涉及您自己的一些工作,这可能不适合该项目。
其一,您需要弄清楚以下函数< /a> 负责在您要修改的应用程序中进行 DNS 查找。下一阶段基本上是自己实现 CodeProject 代码,使用 Microsoft Detours 并在返回的蹦床中插入您的修改代码。

我仍然不太确定为什么你需要这样做,如果你能提供有关最终目标的更多细节,你可能会得到更好的答案。

I'm not sure what your purpose is, but there are several options.
CodeProject includes something that might help you here. It seems to do what you need to do.
Now, the other solution might involve abit of work of your own that might be inappropiate for the project.
For one, you need to figure out if the following function is the one responsible for DNS lookups in the applications you want to modify. The next stage is basically implementing the CodeProject code yourself, set up a global hook using Microsoft Detours and in the returning trampoline insert your modifying code.

I'm still not quite sure why you need to do this though, if you would provide more detail on the end goal, you might get better answers.

煮茶煮酒煮时光 2024-08-09 04:34:45

您可能正在 dnsapi.lib/dnsap.dll 中寻找 Hooking DNSQuery() 函数调用

You may be looking for Hooking DNSQuery() function calls in dnsapi.lib/dnsap.dll

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