This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
user:mcooper6:rene [2010/02/20 13:27] – mcooper6 | user:mcooper6:rene [2013/01/19 15:13] (current) – [Sarting eggdrop] mcooper6 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <WRAP left 40%> | ||
+ | ~~TOC~~ | ||
+ | </ | ||
+ | // | ||
+ | // | ||
+ | <WRAP centeralign 90% bigger> | ||
+ | <WRAP bigger fgred> | ||
+ | <WRAP muchbigger> | ||
+ | There' | ||
+ | </ | ||
+ | <WRAP left 50%> | ||
+ | <WRAP info left 80% bgwhite> | ||
+ | Following the steps in this tutorial will lead you to the successful creation and customization of your very own IRC roBOT, complete with personality. | ||
+ | </ | ||
+ | <WRAP warning left 80% bgwhite> | ||
+ | This is a time consuming process that is not for the faint of heart. | ||
+ | \\ | ||
+ | \\ | ||
+ | **Requirements: | ||
+ | * Some flavor of Linux/Unix or a shell account | ||
+ | * [[http:// | ||
+ | * The egg-fu .tcl script | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | =====Step 1: Get a bot===== | ||
+ | |||
+ | This tutorial specifically describes the process of getting and setting up [[http:// | ||
+ | |||
+ | * Get a bot from eggdrophelp.org in the form of a gzipped tarball and download it to your computer. | ||
+ | |||
+ | From my Mac OS X shell, I used '' | ||
+ | |||
+ | <cli> | ||
+ | :~$ scp -v / | ||
+ | </ | ||
+ | |||
+ | <WRAP info bgwhite> | ||
+ | NOTE: Replace the ' | ||
+ | \\ | ||
+ | \\ | ||
+ | NOTE: the '' | ||
+ | </ | ||
+ | |||
+ | * Extract the files from the eggdrop tarball. | ||
+ | <cli> | ||
+ | :~$ tar zxvf eggdrop1.6.19+ctcpfix.tar.gz | ||
+ | </ | ||
+ | |||
+ | <WRAP info bgwhite> | ||
+ | Before extracting the files from the tarball, it is a good idea to create a new directory for your eggdrop. | ||
+ | </ | ||
+ | |||
+ | * Navigate to the eggdrop working directory and begin the configuration process | ||
+ | |||
+ | <cli> | ||
+ | :~$ cd eggdrop1.6.19 | ||
+ | </ | ||
+ | |||
+ | * Next, the '' | ||
+ | |||
+ | <cli> | ||
+ | :~$ ./configure | ||
+ | </ | ||
+ | |||
+ | * Next, type '' | ||
+ | |||
+ | <cli> | ||
+ | :~$ make config | ||
+ | |||
+ | :~$ make | ||
+ | </ | ||
+ | |||
+ | * After the configs have been made, type '' | ||
+ | <cli> | ||
+ | :~$ make install DEST=~/ | ||
+ | </ | ||
+ | <WRAP info bgwhite> | ||
+ | NOTE: The eggdrop tutorials suggest that the '' | ||
+ | </ | ||
+ | |||
+ | * Switch to your home home directory and run a chmod on the directory where eggdrop is installed. | ||
+ | |||
+ | This step makes the entire directory an executable, which we're going to call at the end. | ||
+ | <cli> | ||
+ | :~$ cd .. | ||
+ | |||
+ | :~$ chmod 700 botdir | ||
+ | </ | ||
+ | <WRAP info bgwhite> | ||
+ | Again, '' | ||
+ | </ | ||
+ | |||
+ | * Remove the installation tarball. | ||
+ | |||
+ | =====Step 2: Configure It===== | ||
+ | This is a detailed run-down of all the lines in the .config file that can/should be changed. | ||
+ | |||
+ | * Set your eggdrop path. | ||
+ | < | ||
+ | line 1: #! / | ||
+ | </ | ||
+ | |||
+ | * This line sets the bot's owner. | ||
+ | < | ||
+ | line 26: set username " | ||
+ | </ | ||
+ | |||
+ | * line 30 provides the information that is shown to the user when they type /msg help | ||
+ | |||
+ | < | ||
+ | line 30: set admin "My Name <email: $USER@your.domain.here" | ||
+ | </ | ||
+ | |||
+ | * Next, set the network on which your bot will reside. | ||
+ | < | ||
+ | line 34: set network " | ||
+ | </ | ||
+ | |||
+ | * The hostname is one of the most important settings. | ||
+ | |||
+ | < | ||
+ | line 58: uncomment | ||
+ | line 58: set my-hostname " | ||
+ | </ | ||
+ | |||
+ | * line 130 sets this name of the .log file. In this case, it's not a bad idea to set it to the name of your bot. This prepares your bot for the possibility of installing a friend. | ||
+ | |||
+ | < | ||
+ | line 130: Comment out | ||
+ | line 131: logfile mco * " | ||
+ | </ | ||
+ | |||
+ | * Set your channel information by editing line 136/ | ||
+ | < | ||
+ | line 136: comment out | ||
+ | line 137: set logfile jpk <# | ||
+ | </ | ||
+ | |||
+ | * Line 178 sets up the bot's actual user file for interacting on IRC. Eggdrop will come here to get information each time the bot is started. (This might also be retrieved each time the bot joins a new channel, but this reporter didn't look it up to be sure.) | ||
+ | < | ||
+ | line 178: set userfile "< | ||
+ | </ | ||
+ | |||
+ | * Next, set the pid (process ID) file. As far as this author is concerned, it's a good idea to set this line (and line 178) to a file name that reflects its relationship to the bot. However, this is optional. | ||
+ | |||
+ | < | ||
+ | line 182: set pidfile " | ||
+ | </ | ||
+ | |||
+ | * Uncomment line 255 and choose a random port for your bot to listen in on. In this case, I chose random number between 49152 and 69535 (the more unlikely range of ports in use). | ||
+ | < | ||
+ | line 255: listen 59393 all | ||
+ | </ | ||
+ | |||
+ | * Change line 262 to prevent trivial boots from the channel. | ||
+ | The default setting of 2 is a little too strict for some people' | ||
+ | < | ||
+ | line 262: set remote-boots 1 | ||
+ | </ | ||
+ | |||
+ | * Reset line 269 to prevent people from telnet-ing the bot requesting environment and other settings. | ||
+ | Egghelp.org recommends setting this to 1 for greater security. | ||
+ | < | ||
+ | line 269: set protect-telnet 1 | ||
+ | </ | ||
+ | |||
+ | * Set require-p to 1, thus restricting party line access to only those users specified by the bot's owner. | ||
+ | < | ||
+ | line 283: set require-p 1 | ||
+ | </ | ||
+ | |||
+ | * Using the stealth-telnets setting prevents the bot from identifying itself as such (that is, a bot). Instead it will respond with its nick. | ||
+ | < | ||
+ | line 292: set stealth-telnets 1 | ||
+ | </ | ||
+ | |||
+ | * It's a good idea to reset the dcc-flood-thr to a slightly higher number, thus allowing more lines to be pasted into the channel. | ||
+ | < | ||
+ | line 305: set dcc-flood-thr 5 | ||
+ | </ | ||
+ | Now, a little net friendliness to put the network admins on our side. | ||
+ | |||
+ | * Reset hourly-updates to a value other than 00. | ||
+ | |||
+ | 00 represents the minutes (on the hour) when your bot will save its user file. Since there may be more than one bot on the network, resetting our hourly-updates to another number means that our bot will save its file at a different minute in the hour. | ||
+ | |||
+ | < | ||
+ | line 350: set hourly-updates 17 | ||
+ | </ | ||
+ | |||
+ | * Next, set yourself as the owner. | ||
+ | <WRAP warning bgwhite> | ||
+ | **Don' | ||
+ | </ | ||
+ | < | ||
+ | line 354: Uncomment | ||
+ | line 354: set owner " | ||
+ | </ | ||
+ | |||
+ | * Comment out line 411. | ||
+ | |||
+ | This is one of the gotchas that the authors of eggdrop put in there to make sure that a lazily configured bot doesn' | ||
+ | < | ||
+ | line 411: comment out | ||
+ | </ | ||
+ | * Optional: Set up a chanfile. | ||
+ | You can either do this here, or you can hard code the channels using the addchannel settings shown later. | ||
+ | |||
+ | < | ||
+ | line 453: set chanfile " | ||
+ | </ | ||
+ | |||
+ | * Required: Set at least one channel for the bot to monitor. | ||
+ | |||
+ | < | ||
+ | Lines 772 - 792: | ||
+ | |||
+ | 772: channel add < | ||
+ | 773: | ||
+ | 774: | ||
+ | 775: | ||
+ | 776: | ||
+ | 777: | ||
+ | 778: | ||
+ | 779: | ||
+ | 780: | ||
+ | 781: | ||
+ | 782: | ||
+ | 783: | ||
+ | 784: | ||
+ | 785: | ||
+ | 786: | ||
+ | 787: | ||
+ | 788: | ||
+ | 789: | ||
+ | 790: | ||
+ | 791:} | ||
+ | |||
+ | 792: channel set #< | ||
+ | </ | ||
+ | <WRAP info bgwhite> | ||
+ | Remove line 781 if you plan on deploying your bot on a channel where it cannot get ops. Otherwise it will keep asking for ops again, and again and again. | ||
+ | </ | ||
+ | <WRAP warning bgwhite> | ||
+ | From here on out, your line numbers will likely differ from this tutorial, due to different (more or less) channel settings. | ||
+ | </ | ||
+ | * Set the bot's nick | ||
+ | < | ||
+ | line 814: set nick "< | ||
+ | </ | ||
+ | |||
+ | * Set the bot's alternate nick | ||
+ | Say the bot gets to its channel, and there' | ||
+ | < | ||
+ | line 819: set altnick "< | ||
+ | </ | ||
+ | |||
+ | * Set the bot's real name. This will appear when users perform /who on the channel where the bot resides. | ||
+ | If you're looking to cloak your bot, make sure you change this to something that represents what a human would write. | ||
+ | < | ||
+ | line 823: comment out | ||
+ | line 824: set realname "Hi, I'm < | ||
+ | </ | ||
+ | |||
+ | * Line 849 - 850 set the bot's port and server. | ||
+ | < | ||
+ | line 848: set servers{ | ||
+ | line 849: | ||
+ | line 850:} | ||
+ | </ | ||
+ | |||
+ | * Next, set the bot's server cycle. | ||
+ | This is the setting that tells the bot how often to establish a connection with its server. | ||
+ | < | ||
+ | line 890: set server-cycle-wait 20 | ||
+ | </ | ||
+ | |||
+ | * Button up security by setting learn users to 1. | ||
+ | Setting learn users to 1 means that you have to add users manually before they can access your party line chat. Setting this to zero allows people to invite themselves. | ||
+ | < | ||
+ | line 1048: set learn-users 1 | ||
+ | </ | ||
+ | |||
+ | * Unbind the default /msg command | ||
+ | By default, anybody can issue a /msg your bot with the ' | ||
+ | < | ||
+ | line 1066: uncomment | ||
+ | line 1067: uncomment | ||
+ | line 1067: bind msg - < | ||
+ | line 1074: bind msg - < | ||
+ | </ | ||
+ | |||
+ | * Tell your bot where to keep notes. | ||
+ | You can retrieve these notes using DCC & /msg commands. | ||
+ | |||
+ | < | ||
+ | line 1266: set notefile "< | ||
+ | </ | ||
+ | |||
+ | * Finally, get the last gotcha | ||
+ | < | ||
+ | line 1288: comment out | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | =====botchk and crontab===== | ||
+ | After the bot's .conf file is created and configured it's time to set up your botck and crontab files. | ||
+ | |||
+ | First, eggdrop comes with a handy little checker called '' | ||
+ | |||
+ | *Issue the following command to change the permissions for autobotchk | ||
+ | |||
+ | <cli> | ||
+ | :~$ chmod 700 autobotchk | ||
+ | </ | ||
+ | |||
+ | * Now run autobotchk | ||
+ | |||
+ | <cli> | ||
+ | :~$ ./ | ||
+ | </ | ||
+ | |||
+ | At this point, you should have a very clear idea of any other issues that need to be taken care of prior to launching your bot. | ||
+ | |||
+ | =====Sarting eggdrop===== | ||
+ | Finally, it's time to start this damn thing. | ||
+ | |||
+ | * Issue the following command the FIRST time you start your bot. | ||
+ | <cli> | ||
+ | :~$ ./eggdrop -m < | ||
+ | </ | ||
+ | |||
+ | The '' | ||
+ | |||
+ | <WRAP info bgwhite> | ||
+ | Make sure you're in the channel before you launch your eggdrop bot, otherwise the bot will be the channel op, and may not share the bounty. | ||
+ | |||
+ | <cli> | ||
+ | ## | ||
+ | ## find the running process | ||
+ | ## | ||
+ | |||
+ | :~$ ps x | grep eggdrop | ||
+ | |||
+ | ## | ||
+ | ## kill it! | ||
+ | ## | ||
+ | |||
+ | :~$ kill < | ||
+ | |||
+ | ## | ||
+ | ## where '< | ||
+ | ## | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | =====Set Up===== | ||
+ | Once eggdrop has joined the channel that was set in the < | ||
+ | |||
+ | Where < | ||
+ | <cli> | ||
+ | /msg < | ||
+ | </ | ||
+ | |||
+ | Follow this with: | ||
+ | where < | ||
+ | <cli> | ||
+ | /msg < | ||
+ | </ | ||
+ | <WRAP warning bgwhite> | ||
+ | NOTE: don't set your password in the company of prying eyes, as your password is shown as plain text while typing, and is then spit back out to the screen. | ||
+ | </ | ||
+ | <WRAP info bgwhite> | ||
+ | If your password has been plastered all over your IRSSI screen session, simply issue the command ''/ | ||
+ | </ | ||
+ | |||
+ | =====Set up AI===== | ||
+ | Now, if you're reading this section, chances are good that you have a working bot. (If not, review the previous steps.) | ||
+ | |||
+ | Now, we can give our bot a personality. | ||
+ | |||
+ | *Downloaded egg-fu from egghelp.org | ||
+ | |||
+ | Just as above, the '' | ||
+ | |||
+ | |||
+ | * Once egg-fu is uploaded to the shell, unpack the files in the eggdrop ./scripts directory | ||
+ | |||
+ | Unpacking the archive will create a new directory (likely named egg-fu_2.0.2) within your scripts directory. | ||
+ | |||
+ | * Set up the working channels | ||
+ | <WRAP info bgwhite> | ||
+ | Interestingly, | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | line 58: set working-chans "# | ||
+ | </ | ||
+ | |||
+ | * Set who to ingnore | ||
+ | Use this setting to tell your bot who NOT to learn from. Set this to the nicks of other bots or even other annoying people whose influence you'd rather avoid. | ||
+ | < | ||
+ | line 61: set other-bots "bot1 bot2 annoying_usr" | ||
+ | </ | ||
+ | |||
+ | * Now, edit < | ||
+ | |||
+ | This line tells eggdrop what scripts to use at startup. | ||
+ | < | ||
+ | line 1368: source scripts/ | ||
+ | </ | ||
+ | |||
+ | * Give it a brain | ||
+ | Find the wordfile line and set it to the path where you'd like to keep the brain. | ||
+ | < | ||
+ | line 64: wordfile " | ||
+ | </ | ||
+ | |||
+ | That's it! All the other default settings are good to go. | ||
+ | |||
+ | Now, there are a few ways to get your bot to recognize the new script. | ||
+ | |||
+ | To rehash your bot, enter the following commands from irssi | ||
+ | |||
+ | <cli> | ||
+ | /dcc chat < | ||
+ | </ | ||
+ | |||
+ | This will open a new window within irssi. | ||
+ | |||
+ | =====Useful Tips===== | ||
+ | |||
+ | <WRAP info bgwhite> | ||
+ | Detaching from a screen when there are multiples, means that you have to know the number of your session. | ||
+ | </ | ||
+ | |||
+ | =====Other Useful Settings===== | ||
+ | These are a few other optional lines that might be useful: | ||
+ | |||
+ | You can set the file system permissions with line 221 | ||
+ | < | ||
+ | line 221: set userfile-perm 0600 | ||
+ | </ | ||
+ | |||
+ | When using your bot in a botnet, lines 246 and 247 allow you to set which ports should be listened in on. | ||
+ | < | ||
+ | line 246: listen 3333 bots | ||
+ | line 247: listen 4444 users | ||
+ | </ | ||
+ | |||
+ | If you have learn-users set to 0, it's a good idea to make sure that line 357 is set to $owner (default). | ||
+ | < | ||
+ | line 357: set notify-newusers " | ||
+ | </ | ||
+ | |||
+ | You can comment out lines 379 and 380 if you wish to allow .tcl and .set commands from the DCC chat interface. | ||
+ | < | ||
+ | line 379: unbind dcc n tcl *dcc: | ||
+ | line 380: unbind dcc n set *dcc:set: | ||
+ | </ | ||
+ | |||
+ | Setting the strict-host setting causes eggdrop to ignore the tilde (~) in usernames. | ||
+ | < | ||
+ | line 858: set strict-host 0 | ||
+ | </ | ||
+ | |||
+ | Set dcc-block does what it says, it blocks DCC chat commands. | ||
+ | < | ||
+ | line 1145: set dcc-block 0 | ||
+ | </ | ||
+ | |||
+ | If you plan on installing any type of file system, these are the lines you seek. | ||
+ | < | ||
+ | line 1230: set files-path "/ | ||
+ | line 1235: set incoming-path "/ | ||
+ | </ | ||
+ | |||
+ | =====Useful Links===== | ||
+ | *[[http:// | ||
+ | *[[http:// | ||
+ | |||
+ | =====Conventions Used===== | ||
+ | * '' | ||
+ | * '' | ||
+ | * Replace '' | ||
+ | * Replace '' | ||
+ | * ''< | ||
+ | * ''<# | ||
+ | * To " |