Sign in to follow this  
Followers 0
jiglei

Regarding _MemorRead

6 posts in this topic

#1 ·  Posted (edited)

Hello all, I'm kindda new in complicated stuff, as reading memory.

I've got the nomad functions to read memory, but, my problem relies on getting the memory adress of a program.

I've searched, and someone told that using cheatengine to find memory adresses was a good idea. But, the adresses that cheatengine retrieves aren't in the format that those functions need (0x00000) they are like: 04720D20

So, If there's a way to convert those format to the one that is suitable, i'd like to know it, or, if there's other way to find memory adresses, better than cheat engine, please tell me about it :)

By the way, i just need a simple thing: like this:

$Memory=_MemoryOpen($Process)
$MemoryRead=_MemoryRead($adress,$Process)
GUICtrlSetData($Label5,$MemoryRead)
_MemoryClose($Memory)

Simple isn't it? the problem is getting the address :S

Thanks for your time.

Edited by jiglei

Share this post


Link to post
Share on other sites



0x04720D20

?

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I've tried it, but it didn't seem to work.

But... could it be some address malfunction? So, if it was that simple, any address would be suited.

So, why does the _memoryread function return 0? If it did work it would return something else...

EDIT: Somehow, it doens't return 0 anymore, now it returns something else. I've modified the script:

#include <NomadMemory.au3>

$Process=WinGetProcess("Window")
$Address=0x424ED28
$Adress2=0x5388D28
$Open=_MemoryOpen($Process)
$REad=_MemoryRead($Address,$Open,Char[11])
$Read2=_MemoryRead($Adress2,$Open,Char[11])
_MemoryClose($Open)
MsgBox(1,"lol","Address1:" & $REad & @CRLF &"Adress2:" & $Read2 & @CRLF & "Error:" & @ERROR)

Now it works great, but I think I still need to find a pointer, because the address doesn't seem to be static. But let me try first finding a common address.

EDIT2:

The fact is that the same application, has a different memory address each time it is run, but while it is run, the address is static. I don't know how to find pointers or offsets, whatever.

Can someone give me some tips? Can it be found with cheat engine?

Edited by jiglei

Share this post


Link to post
Share on other sites

Have you seen this thread?


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

That thread didn't help me at all, that requires "green" adresses, and the adresses that contain the data that i want to read, are not green, and there aren't other adresses with the same data.

So, is there any other way around it?

Its lame that I can't even read a simple data... (actualy i can, but I can't make it effective if i always have to rewrite the adress manualy).

EDIT:

this is the code I prepared with what i learned from the post:

#include <NoMadMemory.au3>
#include <MemoryGetBaseAddressUDF.au3>

$Process=WinGetProcess("[PTZENONPT] SBot v1.43a (C)2008,2009 by bot-cave.net")
$Adress=Dec("0422DB08")
$Adress2="0x0422DB08"
$Open=_MemoryOpen($Process)
$baseADDR = _MemoryGetBaseAddress($Open, 1)
$finalADDR = "0x" & Hex($baseADDR + $Adress)
$Read=_MemoryRead($finalADDR,$Open,"Char[11]")
$Read2= _MemoryRead($Adress,$Open,"Char[11]")
_MemoryClose($Open)
MsgBox(1,"",$Read & @CRLF & $Read2 & @CRLF & $finalADDR & " and " & $Adress2)
sleep(2000)
Exit

but somehow, the $Read variable(containing the base address + the adress) is different from $Read2, that reads the address of the common address returned by cheat engine, and that value is correct.

So, if it was done well, the base adress should contain the same data that the adress, right? So why doesn't it ? :S

Where have i failed?

Edited by jiglei

Share this post


Link to post
Share on other sites

EDIT2: Or could it be because the address I got isn't a "green" (static) address?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0