How to Install the Ladbrokes Poker Client on Linux using Wine

July 26th, 2006

It has been my aim to get rid of Microsoft Windows entirely from my computer. The only thing that stopped me was the Ladbrokes Poker client which is only supported on Windows. However, I now have it working under wine. It is a little bit fiddly but here’s how I did it.

  1. Install wine
  2. Configure wine
  3. Install Mozilla
  4. Install Mozilla ActiveX Control
  5. Install Shockwave plugin
  6. Install Ladbrokes Poker Client

1. Install wine

I have installed wine version 0.9.8. My distribution is Gentoo and so as root I simply typed

emerge -av wine

2. Configure Wine

Wine has a new configuration tool since the last time I used it.

winecfg

This launches a gui and sets up a folder structure under ~/.wine. You can choose the correct sound drivers at this point and which version of Windows you want to emulate. I chose Windows XP.

3. Install Mozilla

Download the latest version of the Mozilla browser (I used version 1.7.12) and install this in wine.

wine mozilla-win32-1.7.12-installer.exe

At this point you may be wondering why you are installing Mozilla under wine. The Ladbrokes Poker Client needs to use some ActiveX controls and therefore we must use the Mozilla ActiveX Controls for the client to finish its install.

4. Install Mozilla ActiveX Control

Before installing Mozilla ActiveX Control we must first install runtime60.zip. Unzip the contents of this file and put them in .wine/windows/system32.

unzip runtime60.zip

cp MSVC* ~/.wine/drive_c/windows/system32/

Now we can download the Mozilla ActiveX Control and install using wine.

wine MozillaControl1712.exe

5. Install Shockwave plugin

Download the latest version of the Shockwave plugin amd install it using wine.

wine Shockwave_Installer_Slim.exe

6. Install Ladbrokes Poker Client

wine LadbrokesPokerSetup.exe

And that is it. You can now login and play Ladbrokes poker on linux. Here is the proof.

7338

Useful Links

How to Crack a WEP Encrypted Wireless Network

July 12th, 2006

My wireless lan has been encrypted using WEP for a few years. After hearing that WEP was insecure I decided to try and crack it. It was suprisingly easy and this is how I did it.

  1. Install Kismet and Aircrack
  2. Use Kismet to find available wireless networks
  3. Use airodump to collect initialization vectors
  4. Use aircrack to find the WEP key

1. Install Kismet and Aircrack

This will depend on your particular distribution. I am using Gentoo and therefore this is as easy as

emerge kismet aircrack

Note: Getting your wireless card and drivers to work with Kismet can be tricky. It works fine on my desktop with a wg311v2 card from netgear and using the acx111 drivers. It doesn’t work on my older laptop since my card does not support raw monitoring.

2. Use Kismet to find available wireless networks

Launch Kismet

kismet

Kismet will now start sniffing for wireless packets. A couple of wireless networks will probably show up. I like to order them by signal strength, type “s” followed by “Q”. Kismet will show lots of useful information about each network such as ssid, mac address and type of encryption. To get more detailed information on a network, scroll down to it and press “i”. At this stage we need to note down the ssid, channel and mac address of the network you are interested in.

Note: Kismet would not work unless I was already connected to another wireless access point.

3. Use airodump to collect initialization vectors

It’s time to use airodump. Airodump will monitor a network and collect specific encrypted packets. These packets are called initialisation vectors (IVs) and are the achilles heel of wep encryption. Once you have collected enough IVs then you can get the key. How much is enough? Well it depends on a number of factors such as key size (64 or 128) and luck as well. You are generally looking at collecting between 200,000 and 2,000,000 IVs. Depending on the traffic on this network it may take some time, days or even weeks. There are tools which can speed up this process such as void11 and aireplay, these are not covered here.

Using the information we collected in part 2, we can start to collect IVs using airodump.

airodump wlan0 cap 6 00:11:22:33:44:55

This will monitor on the wlan0 network interface, on channel 6 for packets transmitted from the access point with the mac address 00:11:22:33:44:55. It will output files appended with the suffix “.cap”. Insert the information you collected from kismet into this command and watch airodump collect IVs. You can leave this running while starting up aircrack.

Note: For some reason airodump did not work for me until I had first used kismet.

4. Use aircrack to find the WEP key

Aircrack uses the IVs collected previously to find the key. We can start aircrack and it will automatically add in new keys as they are found by airodump.

aircrack -f 2 -m 00:11:22:33:44:55 /tmp/cap*.cap

The -f stands for fudge factor. Increasing this value will make the search slower but will increase your chances of of getting the key. Start of with a factor of 2 and then try doubling the value. I tend to find that values above 16 are simply a waste of time. You probably just need to collect more packets. Eventually, aircrack will probably find the key. I say probably because there is no guarantee that you will find the key although in my experience it is very likely.

Useful Links

Solaris 10 and Windows XP Virtual Machines running on Linux using Qemu

May 7th, 2006

Here is a screenshot.

7153

Using PECL-APC with Gallery

April 2nd, 2006

I recently decided to use a php cache to speed up the response of my websites. I decided to use PECL-APC (Alternative PHP Cache) and I did the following

  1. Installing PECL-APC
  2. Check Installation
  3. Fix Problems with PECL-APC and Gallery

1. Installing PECL-APC

I’m using PHP5 and Gentoo. The dev-php5/pecl-apc package is masked by the ~x86 keyword and so I have added this line to /etc/portage/package.keywords

dev-php5/pecl-apc ~x86

I then emerged this package using the following command

emerge dev-php5/pecl-apc

2 . Check installation

You can then check this is working by creating a file on your webserver with this line in it

<?php phpinfo(); ?>

and navigating to the page. Do a search on this page for apc. If it’s there then it should be working.

3. Fix Problems with PECL-APC and Gallery

Unfortunately after installing pecl-apc my Gallery installation began to give me the following error.

Fatal error: Call to undefined method GalleryAlbumItem::onLoad() in modules/core/classes/helpers/GalleryEntityHelper_simple.class on line 102

The solution to this problem was to make sure pecl-apc did not cache certain scripts in the Gallery installation, namely the .class files. I edited the /etc/php/apache2-php5/ext/apc.ini file and made the following change.

apc.filters="-Gallery.*\.class"

I then restarted apache and the problem was gone.

Useful Links

Using the Geo-IP plugin with Awstats in Gentoo Linux

January 15th, 2006

Here’s a summary of what we’re going to do…

  1. emerge Geo-IP
  2. Check that it works using geoiplookup
  3. Edit the awstats config file

1. Emerge Geo-IP

It’s as easy as …

emerge Geo-IP

This will also emerge the geoip package if it is not already installed.

2. Check that it works using geoiplookup

We can check that geoip is working using the geoiplookup command…

geoiplookup www.bbc.co.uk

Should give …

GeoIP Country Edition: GB, United Kingdom

3. Edit the awstats Config File

Edit your awstats config file to activate the Geo-IP plugin. This file is in /etc/awstats/.

vi /etc/awstats/awstats.yourdomain.conf

and add this line

LoadPlugin="geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat"

You can change the last argument of this command if your GeoIP database is installed in another location.

That’s it! Awstats now shows which country an IP address comes from.