agathos
Nov 4 2003, 05:11 PM
hi my question is whats wrong
btw what i fogot??
| CODE |
#include "stdafx.h" #include <stdio.h> #include <winsock2.h> #include <windows.h> #include <process.h> #include <string.h> #include <winbase.h> #pragma comment(lib,"ws2_32")
int main(int argc, char *argv[]) { struct sockaddr_in addr_in; struct hostent *host; int pid;
pid = getpid();
printf("\n======================================\n"); printf(" IRC BOT Win32\n"); printf("======================================\n"); printf("[+] Getting PID %d\n",pid); printf("[+] Trying connect to %s:%s\n",argv[1],argv[2]);
addr_in.sin_port = htons(atoi(argv[2])); addr_in.sin_family = AF_INET; addr_in.sin_addr.S_un.S_addr=inet_addr(argv[1]);
host = gethostbyname( argv[1] );
if((host = gethostbyname(argv[1]))==0) { perror("[-] Error"); return 0; }
printf("[+] Connect to %s:6667 success.\n", argv[1]); }
|
EDIT: here is my complete code
i dont know why it doesnt open the socket
CloudyOne
Nov 4 2003, 05:15 PM
what language is this?
if its csharp i just made myself a irc client which connects just find so i might be able to help you a bit ;o