Closed SDClowen closed 2 years ago
private static bool HookWinSock(int processId, string ip, string redirectIp, int port) { var winSockHook = new WinsockHook(processId); winSockHook.SourceIPs = new List<IPAddress> { IPAddress.Parse(ip) }; winSockHook.RemoteIP = new IPEndPoint(IPAddress.Parse(redirectIp), port); winSockHook.AllowReplace = true; winSockHook.OnHook += (sender, e) => { Log.Debug("API function hooked !"); PrintEventArgs(e); }; winSockHook.OnUnhook += (sender, e) => { Log.Debug("API function unhooked !"); PrintEventArgs(e); }; winSockHook.OnHookDetected += (sender, e) => { Log.Debug("API function is already hooked !"); PrintEventArgs(e); }; return true; } HookWinSock(process.Id, "110.234.18.129", "127.0.0.1", 15779); // gwgt1.joymax.com
Fixed, i just forget to call the winSockHook.Hook();
winSockHook.Hook();