Jump to content

Using IRSSI and XDCC

Nallown

Hey guys so I wrote up a tutorial for a friend of mine on how to use XDCC with IRSSI and I thought that some of you guys might be interested in it.

 

This basically goes through some basic linux commands as well as managing things for a server.

 

For those who don't know what IRSSI basically is, a simple plain IRC Client and XDCC is a way to transfer files over to each other. At times this is used as a alternative over torrenting when torrents aren't available so here it goes and I hope you guys enjoy it! ;)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                      ~~~~~~~     USING IRSSI FOR DOWNLOADING FILES FROM XDCC BOTS    ~~~~~~~~                                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~________________________________________________________________|Step 1=         Downloading and Installing IRSSI:             ||                                                              || Downloading and Installing IRSSI is extremely simple. It can || easily be obtained through the YUM package manager or APT    || package manager.                                             ||                                                              || Depending on the Linux distribution you may have installed   || it could be either one of those.                             ||                                                              || To install a package with either APT or YUM simply run either|| the `yum` or `apt-get` command followed by `install` and the || package                                                      ||                                                              || APT: [ apt-get install irssi ]                               || YUM: [ yum install irssi ]                                   |‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾________________________________________________________________|Step 2=   Checking whether IRSSI has installed correctly:     || To check whether IRSSI has installed correctly you can       || simply check its version number.                             ||                                                              || To check irssi's version simply run the `irssi` command      || followed by --version.                                       ||                                                              || [ irssi --version ]                                          ||                                                              || This should print out the version number of irssi.           || Now that you know that irssi is installed you might aswell   || give it a try.                                               |‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾________________________________________________________________|Step 3=               Connecting to a server                  || Now that you know that irssi installed successfully let's    || try to connect to a server!                                  ||                                                              || Connecting to a server is extremely simple. All you are      || required to do is run irssi and use the connect command      ||                                                              || To start irssi simple run the `irssi` command in the         || terminal.                                                    ||                                                              || [ irssi ]                                                    ||                                                              || This would start up irssi for and now you can connect to any || server.                                                      || To connect to a server you simply run the `/connect`         || command followed by the server address.                      || Let's try this out with the rizon server.                    ||                                                              || Rizon's IRC server address is `irc.rizon.net`so let's        || connect to that.                                             ||                                                              || [ /connect irc.rizon.net ]                                   ||                                                              || Once you have connected successfully it would request you to || pick a nick name.                                            || you could do this either by calling the `/nick nickname`     ||                                                              || [ /nick sample-name ]                                        ||                                                              || command or wait 20 seconds and it would generate you a       || temporary nick name                                          ||                                                              || Now let's quit irssi since we know that it's working fine.   || Simply run the `/quit` command to do so.                     ||                                                              || [ /quit ]                                                    |‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾________________________________________________________________|Step 4=        Setting IRSSI up for XDCC Tracking             || To track the download progress of the files you're           || downloading over DCC we will be using a plugin called        || `dccstat`                                                    ||                                                              || This plugin will allow you to track the progress of the      || ongoing DCC downloads as well as manage them in a more       || organized way                                                ||                                                              || Installing this plugin is extremely simple, all you're       || required to do is download the script from the irssi scripts || page into the `~/.irssi/scripts` folder                      ||                                                              || (To ease out the procces I will provide the direct download  || to the dccstat script.)                                      ||                                                              || Let's start of by going into the `.irssi` folder. This       || should be located under your root folder                     || To change directory you use the `cd` command  followed by    || the directory                                                ||                                                              || So let's move into the `.irssi` folder.                      ||                                                              || [ cd ~/.irssi ]                                              ||                                                              || The `~` symbol indicates the root directory and followed     || after that we have `.irssi` which is the folder we're trying || to access                                                    ||                                                              || Now that we're in the .irssi folder we need to find out      || whether we already have the `scripts` folder.                ||                                                              || This can easily be done by listing all the files in the      || folder using the `ls` command which would list all the files || in the current folder.                                       ||                                                              || [ ls ]                                                       ||                                                              || If you see `scripts` listed in there then ignore the next    || paragraph within the tilde (~)                               || ~                                                            || Since the `scripts` folder isn't located in the `irssi`      || folder we're going to need to create it.                     ||                                                              || This can be easily achieved using the `mkdir` command        || followed by the folder name. We will be creating the         || `scripts` folder.                                            ||                                                              || [ mkdir scripts ]                                            ||                                                              || This should have created the `scripts` folder. Double check  || by listing the files again using the `ls` command`           || ~                                                            ||                                                              || Now that we have the `scripts` folder we WILL be downloading || the script into that folder.                                 ||                                                              || First let's go into that folder by using the `cd` command    || followed by `scripts`                                        ||                                                              || [ cd scripts ]                                               ||                                                              || Now let's download the script into that folder.              || To do this we will be using the wget command followed by the || file URL.                                                    ||                                                              || (We will be downloading the `dccstat` plugin and the url for || that is ` http://scripts.irssi.org/scripts/dccstat.pl `)     ||                                                              || So let's download the script using wget.                     ||                                                              || [ wget http://scripts.irssi.org/scripts/dccstat.pl ]         ||                                                              || This should start downloading the script for you and once    || it's done move on to the next step.                          |‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾________________________________________________________________|Step 5=             Installing the script                     || Installing a irssi script is extremely simple all you're     || required to do is load it up every time you start irssi or   || if you'd want then you could instead move the script into    || `~/.irssi/scripts/autorun`                                   ||                                                              || For now let's load up the script manually and I'll           || explaining how to automate the loading later on.             ||                                                              || To load up the script let's start up irssi again using the   || `irssi` command                                              ||                                                              || [ irssi ]                                                    ||                                                              || Now to load up the script you simply run the `/script`       || command followed by `load` to load it up and the script name || In this case the script is called dccstat so let's load that || up.                                                          ||                                                              || [ /script load dccstat ]                                     ||                                                              || Now you should get a notification stating that it has loaded || Let's make sure that it has loaded successfully by calling   || the help command from dccstat.                               ||                                                              || The help command for dccstat is simply `/dccstat`            ||                                                              || [ /dccstat ]                                                 ||                                                              || Now you should get a help page printed with some commands    || and what they do.                                            ||                                                              || Now that it has loaded successfully let's automate the       || loading process so we don't have to load it up every time we || start irssi                                                ||                                                              ||                                                              || As I mentioned earlier on to automate the script loading all || you're required to do is move the script file into           || '~/.irssi/scripts/autorun' so let's do that.                 ||                                                              || To move a file we will be using the `mv` command followed    || by the file name and that followed by the destination.       || In our case we want to move `dccstat.pl` (being the script)  || from `~/.irssi/scripts/ to `~/.irssi/scripts/autorun' so     || let's do that.                                               ||                                                              |___________|  [ mv ~/.irssi/scripts/dccstat.pl ~/.irssi/scripts/autorun/dccstat.pl ] ||                                                              |‾‾‾‾‾‾‾‾‾‾‾| This should have moved the script into the directory.        ||                                                              || Double check by listing the files in the directory so let's  || move into the directory using 'cd' and list the files using  || 'ls' and you should be able to see it there listed.          ||                                                              || Now next time you start irssi it should automatically load   || the script for you aswell                                    |‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾________________________________________________________________|Step6=                Configuring dccstat                     || Now that we have dccstat installed correctly let's configure || it to our likings.                                           ||                                                              || I'm guessing that you'd want to be able to view the progress || of the DCC downloads and also view all the progress download ||                                                              || Well let's do that. First open up irssi again                ||                                                              || [ irssi ]                                                    ||                                                              || And let's run the `dccstat` command again to view the        || available commands.                                          ||                                                              || [ dccstat ]                                                  ||                                                              ||  ( Using the page up and page down key you should be able to || Navigate up and down through the console )                   ||                                                              || If we go up to the top we can see that it mentions that we   || need to add dccstat to the status bar so let's do that.      ||                                                              |___| The command for this is simply `/statusbar dccstat add dccstat` ||                                                              |‾‾‾| [ /statusbar dccstat add dccstat ]                           ||                                                              || And now let's save this using the '/save' command            ||                                                              || [ /save ]                                                    ||                                                              || And now the status bar should appear and it should be saved  || If you'd like to change any other settings then go through   || the help section and have a look at what you'd like to       || change.                                                      ||                                                              || And now you're done! WHOOOHOOOO!!!!                          || You've successfully setup IRSSI for XDCC downloading now     || test this out!                                               |‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾________________________________________________________________|Step 7=                    Using XDCC                         || DCC stands for Direct Client-to-Client.                      || This is basically a protocol which allows you to directly    || transfer files over to each other with the server performing || the handshake.                                               ||                                                              || So what you'd be able to do is transfer files to each other  || over a simple plain protocol.                                ||                                                              || What some people do is host a XDDC bot, this would be a IRC  || user running on a server 24/7 which is always listening for  || a message in a certain format and when it receives it, it    || would transfer the requested file. The message format may    || be as following `/msg bot-name xdcc send file-id`            ||                                                              || The `msg` command would send a message the user followed by  || the command. Everything after that would be the message the  || user would receive.                                          ||                                                              || XDDC bots would listen for the message `xddc` followed by    || `sent` and file ID.                                          ||                                                              || These bots are running on servers on a certain channel.      || We will be using the `#intel` channel on the rizon server.   ||                                                              || Let's start of by finding a file we want to download over    || XDDC. There is a site available which lists all the bots     || on the `#intel` channel with the files they host and the ID  ||                                                              || We can search the intel database for files. The website is:  || ` http://intel.haruhichan.com `                              ||                                                              || Find a file you'd like to download and then proceed.         ||                                                              || Now that you have found the file you'd like to download take || message you're suppose to send by clicking on it             || This will give you a command which send the message to the   || bot user with the ID                                         ||                                                              || These bots are hosted on the `rizon IRC` server on the       || `#intel` channel so first we need to connect to the server   || and channel.                                                 ||                                                              || Connect to the rizon irc server in irssi using the           || `/connect` command followed by the rizon server              ||                                                              || [ /connect irc.rizon.net ]                                   ||                                                              || This should connect you to the rizon server and now let's    || join the `#intel` channel.                                   || To join a IRC Channel you simple use the `/join` command     || followed by the channel. In this case we're connecting to    || the `#intel` channel.                                        ||                                                              || [ /join #intel ]                                             ||                                                              || And now you should have connected to the channel.            || In this channel you should be able to send messages to the   || bots to request the file.                                    || Let's do that!                                               ||                                                              || To request a file simply message the user using the `/msg`   || command followed by the bot username and the message you'd   || send is `xdcc` followed by send and the file ID.             ||                                                              || This is also given to you when picking a file from the intel || site.                                                        || ( sample message: /msg CR-NL|NEW xdcc send #2312 )           ||                                                              || For simplicity and small size reason to quickly download the || file I have looked for:                                      || ` Yami Shibai - Japanese Ghost Stories 2 - 09 [480p].mkv `   ||                                                              || I have picked the NL (Netherlands) Mirror since that is the  || closest to me. Some bots tend to have a name format which    || indicates some information ( e.g: CR-FR = CR=France )        ||                                                              || When I picked my source I got the message I had to send so I || simply ran the command                                       ||                                                              || [ /msg CR-NL|NEW xdcc send #2312 ]                           ||                                                              || And then I switched back to the IRSSI console window         || Using ALT+[1-9] You can switch between windows. For example  || Alt+1 will switch to the first opened window and ALT+2 will  || switch to the second.                                        ||                                                              || I can see that I got a message stating that there is a DCC   || send from a user and now we have to accept this.             ||                                                              || To accept a file simply run the `/dcc` command followed by   || get and the bot username.                                    ||                                                              || [ /dcc get CR-NL|NEW ]                                       ||                                                              || This should start downloading the file for you and as you    || can see in the progress bar it indicates the status of the   || download. now you wait for it to finish.                     ||                                                              || You wouldn't want to close the window since that would stop  || the download so just wait....... and wait....... and done!   ||                                                              || The file once it's done downloading should go into your root || folder and now you can do whatever with it!                |‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾________________________________________________________________|Step 8=              Running XDCC in background               || As I mentioned before you can't close the window since this  || would interrupt the download so we'd want to somehow have it || in a session which we can leave but still keep running and   || come back to.                                                ||                                                              || Luckily this can easily be done in linux since we can use    || something called a `screen`                                  ||                                                              || What a screen allows you to do is create terminal sessions   || which allows run in the background unless if you quit them   || so you can leave the session but keep it active and come     || back to it.                                                  ||                                                              || To create one of these session we run the `screen command    || followed by `-S` and the session name.                       ||                                                              || [ screen -S session-name ]                                   ||                                                              || The -S indicates that the next word following it will be     || the session name.                                            ||                                                              || You will be using this session name to come back to it so    || it's important to give it a name which you'd easily remember || I'll be calling mine `dcc`                                   || So let's create this `dcc` terminal session!                 ||                                                              || [ screen -S dcc ]                                            ||                                                              || now you can do whatever you'd want to in this session and    || hide it by using a hotkey. This hotkey by default is CTRL+A  || and then press D. So let's hide this session                 ||                                                              || { CTRL+A --> D }                                             ||                                                              || Now you should be able to see that the terminal disappeared  || Well since we were running a screen and used a hotkey the    || hotkey to quit it, in fact it never quited it but instead    || just hit it.                                                 ||                                                              || Alright so that means that whatever was happening in that    || session is still happening correct? YES!                     ||                                                              || So you'd be able to keep things running in background and    || close the terminal window without worries.                   ||                                                              || How do I go back to the terminal session though?             || Well simple! we just the `screen` command followed by `-R`   || and that followed by the session name. remember I called my  || session `dcc` so I'll be restoring the `dcc` session         ||                                                              || [ screen -R dcc ]                                            ||                                                              || And now we should be back in the terminal we left but it     || still would of progressed when we left it. Hopefully by now  || it should be done and if it isn't then we can again just     || leave the session with the hotkey `CTRL-A --> D` and come    || back to it a later time.                                     |‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×