Sign in to follow this  
Followers 0
imphat

reading AutoIT memory directly with AutoIT

3 posts in this topic

I've been searching for hours about reading memory with autoIT, but all I seem to find is how to use autoIT to read another program memory (very common issue when you are programming a game bot for example)

My issue is a bit different. I'm using a DLL and calling a method that returns me some error or success code and injects my DLLStruct parameter with a memory address and the size of the response in bytes.

All I need to do is to create a string from this particular sequence of bytes (trivial task for c programmers) but I couldn't find a single way to direct access the memory with AutoIT.

I'm pretty sure that there must be some way, so... anyone can help me?

Share this post


Link to post
Share on other sites



I've been searching for hours about reading memory with autoIT, but all I seem to find is how to use autoIT to read another program memory (very common issue when you are programming a game bot for example)

My issue is a bit different. I'm using a DLL and calling a method that returns me some error or success code and injects my DLLStruct parameter with a memory address and the size of the response in bytes.

All I need to do is to create a string from this particular sequence of bytes (trivial task for c programmers) but I couldn't find a single way to direct access the memory with AutoIT.

I'm pretty sure that there must be some way, so... anyone can help me?

Try ReadProcessMemory API

$hProcess = _WinAPI_GetCurrentProcess()

_WinAPI_ReadProcessMemory($hProcess, $pBaseAddress, $pBuffer, $iSize, ByRef $iRead)


I see fascists...

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Using ReadProcessMemory is extremely overkill. The task is performed with ease using DllStructCreate() utilizing the second optional parameter.

This for instance reads the first 16 bytes of the current (autoit) process:

#include <WinAPI.au3>
$hModule=_WinAPI_GetModuleHandle(0)
$s=DllStructCreate("byte[16]",$hModule)
MsgBox(0,"First 16 bytes",DllStructGetData($s,1))

:D

Edited by monoceres

Broken link? PM me and I'll send you the file!

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