WoWHead client for Linux

(8 comments)

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

Currently unrated

Comments

Charles 8 years, 11 months ago

This script works rather well.

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

Link | Reply

Jeremy 8 years, 7 months ago

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!

Link | Reply

Earl 8 years, 3 months ago

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?

Link | Reply

aigarius 8 years, 3 months ago

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.

Link | Reply

Earl 8 years, 3 months ago

Thanks... looks like it is working.

Link | Reply

Bob 8 years, 1 month ago

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

Link | Reply

Bob 8 years, 1 month ago

never mind about the cd, I red wrong

Link | Reply

aigarius 8 years, 1 month ago

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). :)

Link | Reply

New Comment

required

required (not published)

optional

Recent Posts

Archive

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005

Categories

Authors

Feeds

RSS / Atom