首页
社区
课程
招聘
未解决 [求助]C# 或C++ HOOK Connect 转向本地 127.0.0.1 怎么实现?
发表于: 2019-12-13 01:33 2560

未解决 [求助]C# 或C++ HOOK Connect 转向本地 127.0.0.1 怎么实现?

2019-12-13 01:33
2560
希望能有例子学习一下,,谢谢!

[课程]FART 脱壳王!加量不加价!FART作者讲授!

收藏
免费 0
支持
分享
最新回复 (3)
雪    币: 914
活跃值: (2288)
能力值: ( LV5,RANK:68 )
在线值:
发帖
回帖
粉丝
2
host劫持
2019-12-13 08:56
0
雪    币: 95
活跃值: (379)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
int NewConnect(SOCKET sock, const char * lpszProxyAddress, const int nProxyPort)
{
       OutputDebugStringA(ProxyIP);
       SOCKADDR_IN saProxy;
       saProxy.sin_family = AF_INET;
       saProxy.sin_port = htons(nProxyPort);
       saProxy.sin_addr.s_addr = inet_addr(lpszProxyAddress);
       if (saProxy.sin_addr.S_un.S_addr == INADDR_NONE)
       {
               LPHOSTENT lphost;
               lphost = gethostbyname(lpszProxyAddress);
               if (lphost != NULL)
                       saProxy.sin_addr.S_un.S_addr = ((LPIN_ADDR)lphost->h_addr)->s_addr;
               else
               {
                       return -1;
               }
       }

       return OldConnect(sock, (sockaddr*)&saProxy, sizeof(sockaddr));
}

int WINAPI HookConnect(SOCKET s, const struct sockaddr FAR *name, int namelen)
{
       OutputDebugStringA(ProxyIP);
       return NewConnect(s, ProxyIP, ProxyPort);
}
2019-12-13 10:48
0
雪    币: 772
活跃值: (977)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
laosanls int NewConnect(SOCKET sock, const char * lpszProxyAddress, const int nProxyPort) { OutputDebugStr ...
感谢
2019-12-13 14:34
0
游客
登录 | 注册 方可回帖
返回
//