I'm putting this project on hold indefinitely, so I figured it's better off released than sitting on my hard drive. It should be easily portable to Windows, just needs a few changes to the VirtualMemory class and of course all the static pointers would need fixing.
All it does currently is maintain a valid object list and sift the object list down into Python classes such as LocalPlayer, Player, Unit etc. It can also fetch a limited amount of info about each object. It's a good starting point if you're interested in hacking WoW with Python.
Probably the most complete tool in there is the VirtualMemory class. It represents the entire memory space of a given process and allows you to read & manipulate that process's virtual memory.
- It supports seek(), tell(), read() and write(), and can thus be used similar to a Python file object.
- You can read ints by simply giving the address you want to read as an index of the object, e.g. vm[0x5000] would read an int at 0x5000. This is not based on a cache; the result is fetched dynamically. You can also write ints with this syntax.
- You can read a 'slice' of memory by using a Python slice, e.g. repr(vm[0x1000:0x2000].raw) would return '\x00\x00...' and so on
- It has a handy search() method which does a regex search (yes, regex) on a given region of an app's memory such as MALLOC_TINY. Read up on vmmap for more info.
My progress to date is best demonstrated with this screenshot: http://img2.imageshack.us/img2/812/picture1pyq.png
It must be run as root, and will only work as-is with 3.2.0/3.2.0a. There is no documentation, but the code should be fairly easy to understand.
Many of the static pointers/offsets are lifted directly from Pocket Gnome, so credit is of course due to its developers.
Download: http://rapidshare.com/files/280173235/wowapi.zip