Sign in to follow this  
Followers 0
ileandros

NomadMemory/ _MemoryWrite()

12 posts in this topic

#1 ·  Posted (edited)

Hello,

So as the tittles says i am using nomadmemory. Basicly im trying to write a simple code to change values of my client.

Here is my code:

#include <NomadMemory.au3>
#include <GUIConstants.au3>
#include <GUIConstantsEx.au3>
#include <Misc.au3>
#include <Array.au3>
#include <GUIConstants.au3>
#include <WindowsConstants.au3>
#Include <Constants.au3>
#include <EditConstants.au3>
Global $button[2]
$hGUI = GUICreate("mc_pro", 150,200)
$label = GUICtrlCreateLabel("", 10, 10)
$button[0] = GUICtrlCreateButton("On", 10, 50,70,40)
$button[1] = GUICtrlCreateButton("Off", 10, 100,70,40)
GUISetState(@SW_SHOW)
If ProcessExists("mc_client.exe") Then
$exist=1
else
$exist=0
EndIf
if $exist=0 then
MsgBox(0, "Error", "Please start mc_client first!!")
exit
EndIf

$open = _MemoryOpen(ProcessExists("mc_client.exe"))
While 1
$msg = GUIGetMsg()
Switch $msg
Case $GUI_EVENT_CLOSE
Exit
Case $button[0]
_MemoryWrite(0x004DF73C, $open, 12345, "int")
Case $button[1]
_MemoryWrite(0x004DF73C, $open, 54321, "int")
EndSwitch
WEnd

Ok i got the Static addresses of the values i want to change (0004DF73C- offset 34, 0004DF73C- offset 14).

What i want to do is to change the value. How should _MemoryWrite command be used???

Edit: Edit they are both ints' and their value is 0.

Edited by ileandros

I feel nothing.It feels great.

Share this post


Link to post
Share on other sites



@ileandros

Your memory address is not valid as it's hexadecimal and you have a T.

Br, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

Yes i realized that now. It must have been a mistake in the copy-paste.

I fixed them. But that's not the problem because i was using it with the right addresses in my computer.

I don't really know nomadmemory so i dont know how if usage of _MemoryWrite function is right


I feel nothing.It feels great.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I can't test it right now, but you can give it a try :

_MemoryWrite(0x4DF73C, $open, 12345, "dword") ;32bits
_MemoryWrite(0x004DF73C, $open, 12345, "dword") ;64bits

Br, FireFox.

Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I got a fatal error that crushes my window saying:

Win32 Exception:0xc0000005[0x428]

()

Edit: I tried a tool (Cheat Egnine 6.1 if you know it) to try change the addresses to see if they can or cannot be changed and it works fine. I add the addresses manually, since they are static addresses, and i just change them.

Why the function wont work???...

Edited by ileandros

I feel nothing.It feels great.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

hm... it should work.

Posted Image

Can you try this simple test? check if the value is correctly read and assigned :

NB: check also if the memory address type is 4bytes.

$hOpen = _MemoryOpen(ProcessExists("calc.exe"))
ConsoleWrite(_MemoryRead(0x00393F3C, $hOpen, "dword") & @CrLf)
_MemoryWrite(0x00393F3C, $hOpen, 12345, "dword")

Br, FireFox.

Edited by FireFox
1 person likes this

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

hmmmm.... somethings' wierd in my script.

The address has to have an offset F4 to be the right one. There are more static addresses with same address but other offsets.

How do i set the offset of that address to be F4???


I feel nothing.It feels great.

Share this post


Link to post
Share on other sites

hmmmm.... somethings' wierd in my script.

The address has to have an offset F4 to be the right one. There are more static addresses with same address but other offsets.

How do i set the offset of that address to be F4???

??

address + offset? (by definition)


Ever wanted to call functions in another process? ProcessCall UDFConsole stuff: Console UDFC Preprocessor for AutoIt OMG

Share this post


Link to post
Share on other sites

??

address + offset? (by definition)

Which means?

I feel nothing.It feels great.

Share this post


Link to post
Share on other sites

Which means?

this: ?

$sAddress = "0x" & Hex(0x00393F3C + 0xF4)

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

So like this? It doesn't work

Local $sAddress = "0x" & Hex(0x004DF73C + 0xF4)
   _MemoryWrite($sAddress, $open, 1000, "dword")

Sorry but havent use nomadmemory a lot


I feel nothing.It feels great.

Share this post


Link to post
Share on other sites

Any other ideas why this wouldn't work???


I feel nothing.It feels great.

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