I am injecting a dll in to a process to hook the winsock function connect, i am using microsoft detours 2.1 and this is just a research project
here is the hooked send function, what i want todo is change the ip to where connect is connecting to , does anyone know how todo it?
int WINAPI Mine_Connect(SOCKET Socket,const struct sockaddr *name,int namelen)
static char IP;
sprintf(IP,"%d.%d.%d.%d",(BYTE)name->sa_data, (BYTE)name->sa_data, (BYTE)name->sa_data, (BYTE)name->sa_data);