简体   繁体   English

仅针对浏览器的 DLL 注入

[英]DLL injection for browser alone

I want to be able to type www.mydomain.com into my web browser but have the actual traffic go to something.mydomain.com.我希望能够在我的 Web 浏览器中输入 www.mydomain.com,但让实际流量转到 something.mydomain.com。 I thought to, maybe inject a dll into the process browser(firefox.exe).我想,也许将一个 dll 注入进程浏览器(firefox.exe)。 I tried to use some methods like hooking, dll injection using create remote thread etc. But, since I'm a newbie, especially when it comes to C++ or Assembly level languages, I coudn't understand much about it.我尝试使用一些方法,如钩子、使用创建远程线程的 dll 注入等。但是,由于我是一个新手,尤其是当涉及到 C++ 或汇编级语言时,我对此不太了解。 The one's I could understand are no longer compatible with Win 7 or higherCould someone help me by directing me in the right path.我能理解的那些不再与 Win 7 或更高版本兼容有人可以通过指导我走正确的道路来帮助我。 All I want is know how to intercept/manipulate an outgoing URL request from the browser.我想要的只是知道如何拦截/操作来自浏览器的传出 URL 请求。 I found that TCP/IP first creates some socket using socket() function and then connect() function.我发现 TCP/IP 首先使用 socket() 函数创建一些套接字,然后使用 connect() 函数。 I sthere a way to intercept that?我有办法拦截吗? I want this to be easy, simple and compatible with windows XP to 10. If it's not easy I'm okay with building different codes for different versions.我希望这很容易,简单并且与 Windows XP 到 10 兼容。如果这不容易,我可以为不同的版本构建不同的代码。 If the script is cross platform, it would be even more awesome.如果脚本是跨平台的,那就更棒了。

I don't think what you want to do (or more precisely the way you want to do it) is possible without being the owner of the domain and setting a HTTP redirect on the server.我认为,如果您不是域的所有者并在服务器上设置 HTTP 重定向,就不可能实现您想要做的事情(或者更准确地说是您想做的事情)。

Modifying the hosts file or setting up your own DNS server and having the machine or its router use that to resolve DNS queries is really the only way but...修改主机文件或设置您自己的 DNS 服务器并让机器或其路由器使用它来解析 DNS 查询确实是唯一的方法,但是...

Dependant on the browser this may not be possible.取决于浏览器,这可能是不可能的。 Current versions of firefox and chrome implement dns prefetching which essentially means that they come preloaded with a bunch of popular dns entries for faster page loading times.当前版本的 firefox 和 chrome 实现了 dns 预取,这实质上意味着它们预加载了一堆流行的 dns 条目,以加快页面加载时间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM