ronmage

Memory in autoit

9 posts in this topic

Well as stated I am trying to get memory to work. I am using the cheat engine tutorial just trying to read a memory values. I am using NomadMemory and Nomadmemory2 which I will link for you all and anyone else that is having the same problem. At this point I am thinking my OS and Autoit are too new for it. Can anyone help with getting this to work?

NomadMemory.au3

NomadMemory2.au3

Share this post


Link to post
Share on other sites



45 minutes ago, ronmage said:

Well as stated I am trying to get memory to work.

No you never.

45 minutes ago, ronmage said:

I am using NomadMemory and Nomadmemory2 which I will link for you all and anyone else that is having the same problem.

What problem?

46 minutes ago, ronmage said:

Can anyone help with getting this to work?

Get what to work?

 

Give some explanation, you only wrote a bunch of meaningless words.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

Fair.

#1 - I am trying to get memory to work in autoit. :)

#2 I am linking the nomads includes so that anyone that follows me having a problem with memory reading can follow what I did and fixed it using this post. 

#3-

Here is some code to only read a memory location using the tutorial in cheat engine and output

#include <NomadMemory2.au3>
#include <Array.au3>

Global $mainwindow = "Tutorial-i386"
Global $pid = WinGetProcess($mainwindow)
Global $iHD = 0
Global $address = "0x0014B2B0" ;This is the addres found in step 2 for the tutorial in cheat

$MemArray = _Memoryopen($pid)
_ArrayDisplay($MemArray) ;this is not outputing correctly
$out = _MemoryRead($address, $MemArray)
MsgBox(0,"test",$out)
_Memoryclose($pid)

 

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I am very interested in this.  

Only thing I can add is... did you #requireadmin?

Edited by markyrocks
1 person likes this

Share this post


Link to post
Share on other sites

Maybe.

Did you know which app he want's to cheat? I not, also don't knowing yours, so i can't knowing you need #RequireAdmin or not.

Share this post


Link to post
Share on other sites

I was just taking a wild guess.  

Share this post


Link to post
Share on other sites

well I did get it to work using #requireadmin that was the missing part.

So I am going to like at the end here the code, thank you everyone for the help. 

#include <NomadMemory2.au3>
#include <Array.au3>
#requireadmin

Global $mainwindow = "Tutorial-i386"
Global $pid = WinGetProcess($mainwindow)
Global $iHD = 0
Global $address = "0x0174B328" ;This is the addres found in step 2 for the tutorial in cheat

$MemArray = _Memoryopen($pid)
_ArrayDisplay($MemArray) ;this is not outputing correctly
$out = _MemoryRead($address, $MemArray)
MsgBox(0,"test",$out)
_Memoryclose($pid)

 

Share this post


Link to post
Share on other sites

Sweet!

Share this post


Link to post
Share on other sites

There is a simpilar way. 

 

#include <KryMemory.au3>

$PROCESS = _Process_Open("Example.exe", $PROCESS_ALL_ACCESS, False)

$VAR1 = _Process_ReadMemory($PROCESS, 0x008015D0, "type")) ; type = ( byte, float, dword, char[], byte[] ... etc )

$VAR2_OFFSET[2] = [0x01, 0x02]
$VAR2 = _Process_ReadMemoryPointer($PROCESS, 0x008015D0, $VAR2_OFFSET, "type")) ; type = ( byte, float, dword, char[], byte[] ... etc )

$VAR3 = _Process_WriteMemory($PROCESS, 0x008015D0, $Value, "type")) ; $Value = the value you want to write to memory.

$VAR4_OFFSET[10] = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09]
$VAR4 = _Process_WriteMemoryPointer($PROCESS, 0x008015D0, $VAR4_OFFSET, $Value, "type"))

_Process_Close($PROCESS)

 

KryMemory.au3

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

  • Similar Content

    • RTFC
      By RTFC
      Please answer me these questions three, ere the other side you see:
      Are you running a 64-bit machine with a 64-bit Windows operating system? Can your AutoIt scripts cope with having directive #AutoIt3Wrapper_UseX64=Y, and thus @AutoItX64=True? Are you sick and tired of seeing this error message?
      If you (like me) answered "YES" to all three questions, then the _HighMem library may ease your pain (the name commemorates a useful utility from the days when CPUs were still steam-powered). Forget about pathetic boot switches /3GB and /userva; in a full-fledged 64-bit environment, _HighMem can pre-allocate all available physical/virtual RAM you've got (or any smaller size you need), and manage individual allocations therein with four simple functions:
      _HighMem_StartUp( $nSize, $sUnit="GB" ) ; parse size of total region to pre-allocate, e.g. (10,"GB") _HighMem_Allocate( $nSize, $sUnit="B" ) ; returns $pOffset (new allocation's base address) _HighMem_Release( $pOffset ) ; existing allocations are identified by their offset (base address) _HighMem_CleanUp() ; close handles, release all pre-allocated memory Of course, existing AutoIt limitations remain in force (e.g., DllstructCreate() is still limited to 2 GB per call), but the maximum of 2-4 GB of virtual memory per Windows process can (under the right circumstances, in the proper environment) be circumvented. However, this is the first beta release, so glitches are likely, and performance may vary. In fact, it may not work at all for you (if you're running 32-bit, for example). And since this involves your own hardware, it's unlikely I would be able to reproduce your issues in my own work environment. Nevertheless, if you find obvious bugs or mistakes in the code, please do post. And if it works for you, that's also good to hear. My own motivation for developing it was to supercharge my matrix computing environment (Eigen4AutoIt), so it can handle matrices of any size that fit in machine RAM.
      The attached zip contains the library itself (HighMem.au3) and two test examples. HighMem_Test1 performs a dry run stress test of the allocation management system; it does not actually do any memory I/O. By contrast, HighMem_Test2 pre-allocates a 6 GB space, stores 3 x 2GB structs there, performs some basic I/O, and releases the allocations one by one. Obviously, for this to work you'll need at least that much free RAM to begin with (check with Task Manager -> Performance -> Memory if you're unsure). My own test environment has 16 GB of physical RAM, and runs W10Pro/64.
      EDIT: minor edits added to improve user experience (many more status messages if $_HighMem_Verbose=True)
      HighMem.v0.85.7z
      EDIT: from beta version 0.9, HighMem supports shared memory, including mutex negotiation.
      HighMem.v0.9.7z
    • Meobdg
      By Meobdg
      Hi, I have a problem, my functions do not work with each other. Separately, each works very well. Features that do not work together it's loot() and  pos1(). It looks that after spreadsheet function loot() script stops working even though everything is in the While 1-Wend loop.  Can someone help me please?
       
         
    • Dequality
      By Dequality
      Since my last topic were closed because bot scripting aren't allowed to be discussed anymore on here.
      Could anyone possibly give me a good example to learn memory read/write? , i can't figure out anything else which would be a good level of difficulty to practice than "tetris bot" but since it aint legal, i wont be asking for that let me know ur ideas and i would highly appreciate if examples could be posted (My last project was a imgsrch/pxlsrch) so thought i woud move on to memory read/write, if this somehow came out wrong lmk.
       
      AND NO I'M NOT ASKING FOR A FULL CODE I WANNA CODE/SCRIPT IT MY SELF, Just show me some simple examples of Memory read/write if u can/will TYVM.
       
      Dequality.
    • Dequality
      By Dequality
      I honestly didn't try anything yet.
      But i was thinking about my next step would be to try creating a tetris bot for educational purpose only. Last time i created a automation script / bot for ClubPenguin, which was simply made with PixelSearch If NOT(@error) Then , bla bla u know the drill aight, so i thought i would give my self a little harder challenge instead of keep making Pixelbots, i would love to try making a Memory bot or w/e u call , i read something about memory read/record was used for Tetris bots, since i haven't used Memory, i would love to know if anyone could give me a good guide or smth to follow :-) Either a complete tetris bot guide or a guide that explains memory totally in depth ish. :-)
       
       
      Dequality. #ANY-HELP-APPRECIATET
    • giangnguyen
      By giangnguyen
      I am looking for a way to set up either VIRTUAL_PROTECT or PAGE_GUARD for memory protection. I currently don't know how to do this, I have made the encryption for my EXE Protector, the RunPE module, and basically everything that I need. I also have made an advanced obfuscation tool, which I might release here on the forums in the future, to make sure the code is impossible to be understood. However, people can dump the original EXE from memory when I am injecting it. So how would I implement VIRTUAL_PROTECT, PAGE_GUARD or other methods of protecting memory?