Hi,
i want to read out my Playername with AutoIt .
I know how i can find the Pointer with Cheat Engine, but this Address changes with every WoW Restart.
So how can i read this out ? Can anyone give me e code example ? ( AutoIt or C# )
Greez Bioaim
Hi,
i want to read out my Playername with AutoIt .
I know how i can find the Pointer with Cheat Engine, but this Address changes with every WoW Restart.
So how can i read this out ? Can anyone give me e code example ? ( AutoIt or C# )
Greez Bioaim
GetModuleHandle. The value returned is the base address of the DLL (note that this includes the PE header, so the .text section wont start for this +0x1000).
GetModuleHandle Function (Windows)
and I know both of you know this, but I don't see where the OP said he is running his code in the target programs address space, whereas far as I know GetModuleHandle would be useless unless I am missing something blatantly obvious. In the case that you are out of process, check this
So, here is a code example of my script.
So, how can i extend this script to work after every WoW Start ?Code:#include <NomadMemory.au3> Const $Playername = 0x903F40 $ProcessId = ProcessExists("wow.exe") If $ProcessId > 0 Then $Handle = _MemoryOpen($ProcessId) $playerBase = _Memoryread((0x9B7828 + 0x38) + 0x24, $Handle, 'char[255]') If Not @error Then MsgBox(0, "Name", _MemoryRead(0x01973F40,$Handle, "char[255]"), "char[255]") ;0x01973F40 is the Pointer of my Name - but exactly this changes every Restart, how can i fix that ? Else MsgBox(0, "Fehler", "Der Prozess konnte nicht geöffnet werden!") EndIf Else MsgBox(0, "", "Starte WoW!") EndIf
I am not sure how you do this in AutoIT but I think you will need to enumerate through the modules with the help of what everdox posted. if you find your module you will get a pointer to the "MODULEENTRY32 structure" and can then access the modBaseAdr-Member which gives you the Base Address.
You will need to add this base address to your offsets/addresses for your playerbase. Depending on what theses addresses are based on you will need to edit the offsets(just like Cypher pointed out already).
I hope I got this right. I am not actively doing this so it might all be wrong. Just trying to help where I can.
Edit: apparently there is an easy solution. If you use NomadMemory which is a lib for AutoIT you could simply use _MemoryGetBaseAddress(Handle, HD). Again I don'T use AutoIT so this might be stupid
Edit2: Not sure if it really was Nomad but here is something useful that I found
http://www.autoitscript.com/forum/to...-au3-function/
check the
Func _MemoryModuleGetBaseAddress($iPID, $sModule)
part in the second code window
Last edited by Azzie2k8; 06-25-2011 at 05:27 AM.
You should really check out that link I posted. I assume that HD is the Handle to the Module or something like that. I can't be 100% sure though. But again that link should show you how to use that function. I didn't find the one in NomadMemory I was talking about so you might be better of using the one in the link.
Edit: But then again even if you get the ASLR randomization covered by adding the Base address you will still need a rebased pointer to your name. I have no idea if the one you have is already a static one.
There is an Offset for the WoW Playername right ? So, i can find out the pointer with CE of MY CURRENT ONLINE CHAR right ? And how can i make this static ?
Edit: this link shows exactly the same _MemoryGetBaseAddress() Function. So I need the second parameter of it($Handle is clear)
Last edited by Bioaim; 06-25-2011 at 05:54 AM.
Bioaim check this out.