Jump to content

Recommended Posts

Posted (edited)

I am trying to read 1 bite from process memory but I fail.

#Include <WinAPI.au3>

Dim $pBuffer,$iRead = 1
$hprocess = _WinAPI_OpenProcess(0x0010, False, @AutoItPID)
_WinAPI_ReadProcessMemory($hprocess, 0x08000000, $pBuffer, 1,$iRead)
msgbox(0,0,$pBuffer)

it says in message box:

_WinAPI_ReadProcessMemory: Only part of a ReadProcessMemory or WriteProcessMemory request was completed.

Edited by E1M1

edited

Posted

Personally I always just use PROCESS_ALL_ACCESS parameter in OpenProcess, because it always works. Your issue is that you're not treating the $pBuffer parameter in ReadProcessMemory as an AutoIt DllStruct.

$pBuf = DllStructCreate("byte")
$iRead = 0
$hProc = _WinAPI_OpenProcess(0x1F0FFF, False, @AutoItPID) //0x1F0FFF = PROCESS_ALL_ACCESS

_WinAPI_ReadProcessMemory($hProc, 0x0800000, DllStructGetPtr($pBuf), DllStructGetSize($pBuf), $iRead)

MsgBox(0, "", DllStructGetData($pBuf, 1))

Hope it helps!

Posted (edited)

still not working

I just found it's impossible. (I used CE and found that every time $var value chenges it's address chenges too)

I just wanted to make method to read $var value from other running exe.

Edited by E1M1

edited

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...