#include #include #include struct { int port; char *targetIP; int NumOfAttact, BufSize;} parm;void Pause(void) { cprintf ("Apasati orice tasta pentru a renunta..."); getch(); cprintf ("\r\n"); } int CheckWinsock() { WORD wVersionRequested; WSADATA wsaData; int err; wVersionRequested = MAKEWORD(1, 1); err = WSAStartup(wVersionRequested, &wsaData); if (err != 0) return err; if ( LOBYTE( wsaData.wVersion ) != 1 || HIBYTE( wsaData.wVersion ) != 1 ) { WSACleanup(); return -1; } return 0;}void ParseIP(char* des, char *theIP){ unsigned int val; char i; for (i = 0; i < 4; i++) { if (*theIP != '\0') { val = 0; while (*theIP != '\0' && *theIP != '.') { val *= 10; val += *theIP - '0'; theIP++; } des[i]= (char)val; if (*theIP != '\0') theIP++; } }} void ParseParm(int argc, char* argv[]){ char * value; for (int i=1; i