Skip to content

WoWHead client for Linux

This is highly unofficial, but if you want to upload your World of Warcraft statistics to WoWHead in Linux, then you might be able to do so by using the following script. You will need curl and wget installed.


#!/bin/sh

#Path to WoW
WOW="/home/user/games/World of Warcraft"
#User name on WoWHead
USER="guest"
#MD5sum of your WoWHead password
PASS="badbeef666badbeef666badbeef666ba"
#You MAC address (without separators, lower case)
MAC="010203040a0b"
#WoW account name
ACC="wowman"
#WoW Locale
LOCALE="enUS"

# Ignoring the update info for now, just downloading it all
wget -q http://client.wowhead.com/files/updates.xml -O /dev/null
rm -rf "$WOW/Interface/Addons/+Wowhead_Looter"
mkdir -p "$WOW/Interface/Addons/+Wowhead_Looter"
wget -q http://client.wowhead.com/files/Wowhead_Looter.lua -O "$WOW/Interface/Addons/+Wowhead_Looter/Wowhead_Looter.lua"
wget -q http://client.wowhead.com/files/+Wowhead_Looter.toc -O "$WOW/Interface/Addons/+Wowhead_Looter/+Wowhead_Looter.toc"
wget -q http://client.wowhead.com/files/Wowhead_Looter.xml -O "$WOW/Interface/Addons/+Wowhead_Looter/Wowhead_Looter.xml"
wget -q http://client.wowhead.com/files/Localization.lua -O "$WOW/Interface/Addons/+Wowhead_Looter/Localization.lua"

# Ignoring authentification errors. This should return "0" on a sucessful login.
wget -nv "http://client.wowhead.com/auth.php?username=$USER&password=$PASS&macAddress=$MAC" -O /dev/null

# Uploading all data
TMPDIR=`mktemp -d`
cd $TMPDIR
cp "$WOW/wtf/Account/$ACC/SavedVariables/+Wowhead_Looter.lua" .
cp "$WOW/Cache/wdb/$LOCALE/creaturecache.wdb" .
cp "$WOW/Cache/wdb/$LOCALE/gameobjectcache.wdb" .
cp "$WOW/Cache/wdb/$LOCALE/itemcache.wdb" .
cp "$WOW/Cache/wdb/$LOCALE/pagetextcache.wdb" .
cp "$WOW/Cache/wdb/$LOCALE/questcache.wdb" .
gzip *
curl -F "file0=@+Wowhead_Looter.lua.gz" -F "file1=@creaturecache.wdb.gz" -F "file2=@gameobjectcache.wdb.gz" -F "file3=@itemcache.wdb.gz" -F "file4=@pagetextcache.wdb.gz" -F "file5=@questcache.wdb.gz" "http://client.wowhead.com/upload.php?username=$USER&password=$PASS&macAddress=$MAC"
cd
rm -rf $TMDIR

To get MD5sum of your password use this:

echo -n "password" | md5sum

 

8 Comments

  1. Charles wrote:

    This script works rather well.

    Beware case sensitivity! My WTF and WDB folders were capitalized. Same goes for my login name.

    Tuesday, July 8, 2008 at 01:07 | Permalink
  2. Jeremy wrote:

    Would be nice to get some feedback… maybe parse the wdb files? Or at least say how much of it was new?

    (For reference, my WDB and WTF folders were also capitalised.)

    Thanks for the script!

    Wednesday, November 19, 2008 at 16:11 | Permalink
  3. Earl wrote:

    Does this still work? When running it, the wget that checks authentication returns a 1 instead of a 0. How do we know this if is being uploaded correctly?

    Sunday, March 1, 2009 at 18:03 | Permalink
  4. aigarius wrote:

    When you go to your profile, check the “Data uploads:” number before and after running the script. It still looks to be working for me.

    Sunday, March 1, 2009 at 23:03 | Permalink
  5. Earl wrote:

    Thanks… looks like it is working.

    Monday, March 2, 2009 at 01:03 | Permalink
  6. Bob wrote:

    Great work :D I made a cronjob of parts of it :) . By the way, the last cd should be followed by .. else it only works in your homedir

    Cheers

    Tuesday, April 28, 2009 at 21:04 | Permalink
  7. Bob wrote:

    never mind about the cd, I red wrong

    Tuesday, April 28, 2009 at 23:04 | Permalink
  8. aigarius wrote:

    Yes, that ‘cd’ is only needed to exit the TMPDIR which is referenced by absolute path. It is good to see someone check my code (and even more fun to see it still being used to do good). :)

    Wednesday, April 29, 2009 at 00:04 | Permalink

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*