Thanks for the share, however IRC bots are somewhat obsolete. All traffic is usually detected by most anti-malware programs nowadays. No getting around that unless you have a custom protocol. +1 for the effort, code is clean none the less.
Not true at all. You have to keep in mind that a bot is not necessarily malicious. There are millions of bots out there that does non-malicious tasks.
As for AV's picking up on the protocol. So what? IRC is not illegal. If your AV tells you you have a virus because of IRC protocol activity, your AV is pure shit. Besides, switch the port number and enable SSL and the AV wont be able to tell the difference between random SSL encrypted traffic and IRC traffic. No need for a custom protocol. Worst-case scenario, just write an encrypted proxy tunnel for it.
I would like to add tho that yes. IRC bots for malicious use is on the way to become something from the past. But I don't think that is because of AV's detecting it.
I believe malware designers are moving away from IRC because:
1. It doesn't scale in a cost-effective way for large networks.
2. its CLI. People want GUI's and nice statistics. And this is much easier achieved with web based interfaces.
@OP:
It would be nice if you wrote this as classes instead of namespaces. So that one could create multiple IRC instances in one program. Something like:
int main()
{
IRCc myFirstIRC = new IRCc('irc.evilzone.org', 6667, 'ande', 'ande');
IRCc mySecondIRC = new IRCc('irc.evilzone.org', 6667, 'ande2', 'ande2');
if(myFirstIRC.connected) {
myFirstIRC.join('#evilzone');
myFirstIRC.privmsg('#evilzone', 'Hello world!');
}
if(mySecondIRC.connected) {
mySecondIRC.join('#evilzone');
mySecondIRC.privmsg('#evilzone', 'Hello world2!');
}
}