This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

botnet-nick permanence

Help for those learning Tcl or writing their own scripts.
Post Reply
User avatar
arfer
Master
Posts: 436
Joined: Fri Nov 26, 2004 8:45 pm
Location: Manchester, UK

botnet-nick permanence

Post by arfer »

I need some information to assist with a relay script please.

Supposing I leave the following line commented out (as per the default) in the bots configuration file :-

#set botnet-nick "whatever"

The botnet-nick will revert to the bot's nick on IRC according to the exact wording in the .conf file. My question is this. Will the botnet-nick then continue to mirror bot's nick on IRC (changing as and when the bot's nick changes) or will it stay as the bot's primary nick (as per when the .conf file was loaded).
I must have had nothing to do
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

No. The botnet-nick will stay the same (otherwize your botnet would be a mess..)

Also be aware of the global variables nick and botnick.. and their differences. nick will always remain the same until manually altered, while the botnick will always reflect the actual nickname in use by the bot.
NML_375
User avatar
arfer
Master
Posts: 436
Joined: Fri Nov 26, 2004 8:45 pm
Location: Manchester, UK

Post by arfer »

Thanks.

I wasn't even aware that there was a global variable $::nick. Where on earth did that come from? It isn't even mentioned in the global variables section of tcl-commands.html.

Anyway, you answered my question. By leaving '#set botnet-nick' commented the bot will be permanently known on the botnet by it's primary nick. I was asking because netsplits occasionally cause the primary nick to become enforced and the bot is assigned a guest nick on IRC.

Or, is there any benefit to be derived from deliberately setting the botnet-nick and the botnick to the same in the .conf? Say as follows :-

set botnick Baal
set botnet-nick Baal
I must have had nothing to do
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Well, imagine this (worst case) scenario:
You have 50ish bots linked in a mesh-like fashion, that is, any bot should be able to link to any of the other bots in order to gain access to the botnet (I've managed smaller versions of such botnets, and it's "scary").
Say one of your bots "EvilWizard" is apparently in violation of the nick naming policy of the server, and you decide to rename it to "GoodWizard".

Case 1:
You did not set botnet-nick. You now edit the nick variable and restart your bot. This caused the botnet nickname to be altered aswell, and all of a sudden your bot is now unable to join the botnet. Now you have some 50ish bot records spread over 50ish bots to update... Have fun :p

Case 2:
You did set botnet-nick to EvilWizard. You edit nick to "GoodWizard". Your eggdrop is still able to join the botnet as usual, yet it uses the new nickname on irc. Further, depending on how you setup userfile sharing and hostmasks, you could easily tell all bots how to identify your bot with its new username by merely adding a new hostmask to the botrecord and spread it across the botnet..

Of course, in Case 1, you could set the botnet-nick at the same time you edit nick, but having it set in the first place means you don't have to remember this later on.

This scenario is perhaps not that likely, but even with a small, single-level tree, you'd run into the same hazzle should you need to update the nickname of your hub-bot.

Oh, and as for nick, it's documented in the dist. configuration file:

Code: Select all

# Set the nick the bot uses on IRC, and on the botnet unless you specify a
# separate botnet-nick, here.
set nick "Lamestbot"
NML_375
User avatar
arfer
Master
Posts: 436
Joined: Fri Nov 26, 2004 8:45 pm
Location: Manchester, UK

Post by arfer »

Thanks. I should start reading more.
I must have had nothing to do
Post Reply