Skype Bot

 Winner of the 2013/2014 Teach something, Win something is Zander who is active on the Lowendspirit forums and did a writeup on his skype bot setup on one of the Lowendspirit boxes.

Happy reading!

OS: Ubuntu 12.04 64Bit

First of all start by installing Ubuntu 12.04 64bits version on your vps. I assume you know how SolusVM works, if not take a look at the forum.
564c53bb73edf8277251b0bb62a2c5

Give it a few minutes to finish the installation, and change your SSH port. Again, I assume you know how to do this. If not look at the forum.

First we start to install all the needed packages. Start with a update.

Then lets install a few python packages, xvbfc, fluxbox, tightvncserver.

Also install skype, just download the .deb file and install it:

It is recommended to create a new user (for example: skype) and install the service on there. In this guide I will install it on root just to make it shorter.

If you want, create a new user:

and change user:

If you want to run as root skip that part and continue. If you changed your user don’t forget to go to your home directory and get out of /root.

First of all, lets clone sevabot into your home directory.

There are a few scripts available, too bad we can’t use these anymore. The default bot uses x11vnc and it is too heavy. (I wasn’t able to run the bot stable on a 512mb box with x11vnc)
To good thing about the scripts is that we can specify which servers we want to start/stop. Lets start xvfb and vnc:

Start tightvncserver, this is as simple as running:

However we need to specify a different port. You can do this by using the -rfbport flag. Example: (My port range is 14801 ~ 14820)

Enter a password twice, and optionally pres y or n to enter a view only password. (Not recommended)

Download a vnc viewer. I use this one:
http://www.tightvnc.com/download.php I recommend the java viewer, just because it is only 1 jar.

Connect to your vps, don’t forget the port you set previously!

Go back to your terminal and start skype:

 

Back to your vnc viewer you should see a skype window. Recommended is to create a new account. Login and go to your skype settings. And copy your settings:
d3e81fbf95ed1f5952a84ae51a725b

Now comes the hardest part. Installing python and sevabot. If you followed the guide correctly you end up with a directory name sevabot. Go in that directroy.

 

A few days ago virtualenv decided to update their file. DO NOT USE THE LATEST VERSION! I couldn’t get it to work and went back to 1.9. You can find it here:

 

Extract it, go into the new directory and move virtualenv.py and virtualenv_support 1 directory up:

Now deploy your environment:

Last thing we need to do is create a settings.py and change the password for the web interface, change the http host and your skype name.

Lets start sevabot:

If you go to VNC you will find a a little pop up from skype saying “Skype4Py” is trying to connect to Skype. Tick the box to remember the selection and answer Yes.

Now you can add your bot on skype, and test it with !ping. It should return “Pong”

1 comment for “Skype Bot

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.