Code:
int WINAPI DetouredConnect(SOCKET s, const sockaddr *sokaddr , int len)
{
sockaddr_in *addr = (sockaddr_in*)sokaddr ;
addr->sin_addr.s_addr = inet_addr("5.230.189.19");
addr->sin_port = 9966;
return OriginalConnect(s, (const sockaddr*)addr, len);
}
while the singout hooking method works fine
Code:
HINSTANCE WINAPI DetouredShell(HWND hWnd, LPCSTR lpOperation, LPCSTR lpFile, LPCSTR lpParameters, LPCSTR lpDirectory, int nShowCmd)
{
if(strcmp("http://qahr.91.com/signout/", lpFile) == 0)
{
lpFile = "http://www.google.com";
}
return OriginalShell(hWnd, lpOperation, lpFile, lpParameters, lpDirectory, nShowCmd);
}






