• Welcome to Valhalla Legends Archive.
 

C++ bot requirments

Started by MoNksBaNe_Agahnim, October 10, 2003, 08:13 PM

Previous topic - Next topic

MoNksBaNe_Agahnim

I know some C++, can do some stuff lol, what are some C++ knowledge requirements to make the simplest of the simple bot, like a public chatroom, chat only bot? lol...such as you need to know apstrings, arrays, pointers, ect... ect...

Grok

The simplest of simple bots would be notepad or some other text editor.  It wouldn't be required to connect to anything, or even have multiple windows.  You could just talk to yourself.

Adron

Quote from: MoNksBaNe_Agahnim on October 10, 2003, 08:13 PM
I know some C++, can do some stuff lol, what are some C++ knowledge requirements to make the simplest of the simple bot, like a public chatroom, chat only bot? lol...such as you need to know apstrings, arrays, pointers, ect... ect...

Writing a "main", doing a tcp connection, processing strings (either C-style char arrays or some C++ string class, but something that can be read from/written to a tcp socket).

Not c++, but:

char login[] = "\x3username\npassword\n";

main()
{  int s = socket(AF_INET, SOCK_STREAM, 0);
   struct sockaddr_in sin;
   sin.sin_family = AF_INET;
   sin.sin_port = htons(6112);
   sin.sin_addr.s_addr = inet_addr("some.bnet.ip.address");
   connect(s, &sin, sizeof sin);
   send(s, login, sizeof login - 1, 0);
   while(1) {
       char c;
       recv(s, &c, 1, 0);
       putchar(c);
   }
}

iago

I would read Yoni's post about a couple simple programs to write to learn winsock.  If I knew where it was I'd reference it, but it's somewhere on this forum :)
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*