Jump to content

new _Mem functions


Recommended Posts

i should really doccument my functions more :D

I'm used to one of the first memfunctions written for autoit but when i look at this one i just get confused... could you please write simple instructions for your function with examples?

Syntax of use would be very helpfull... and i presume that mem.au should be included in the script i want to read/write with?

Thanx in advance

Link to post
Share on other sites
  • Replies 198
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

I agree that reviving old topics with a valid request is fine. I also agree that a certain politeness should be adhered to in all topics. But following the board (see "General Help"), this is the thir

Posted Images

@D.M.

reading:

just read the number of bytes and then combine then into the value you want :D

The problem I have when trying to use your reading function is this:

I have to read an address to get a pointer to another address, plus I have to add an offset to the pointer to get the correct address. The pointer address is usually something like, 0x4FBC000. Well, anytime the "byte" value of the address being read is 00, the function automatically exits, and it reads from right to left. So I always get a value of 0 instead of the value 0x4FBC000.

I've revised your functions to suit my needs, but I thought I would point this out so if you wanted to try and resolve this problem, you could. Here is a sample script I did and it shows your modified functions if you would like to take a look at it:

http://www.autoitscript.com/forum/index.ph...f=9&t=27111

Great work none the less, it gave me a great starting point in understanding this concept, :P

Nomad :D

Edited by Nomad
Link to post
Share on other sites
  • 3 months later...

Could any1 help me with this?

Func GetSong(); Adresse: 0012ADF5
    If ProcessExists("WinAmp.exe") Then
        $pid = ProcessExists("WinAmp.exe")
;~      msgbox(0, "", $pid)
        $open = _MemOpen($pid)
        $song = _MemRead($open, 0x0012ADF5)
        msgbox(0, "Song", $song)
        _MemClose($pid)
    EndIf
EndFunc;~~>Songname

it should only get the played song out of winamp :lmao:

[font="Verdana"]In work:[list=1][*]InstallIt[*]New version of SpaceWar[/list] [/font]

Link to post
Share on other sites

Could any1 help me with this?

Func GetSong(); Adresse: 0012ADF5
    If ProcessExists("WinAmp.exe") Then
        $pid = ProcessExists("WinAmp.exe")
;~      msgbox(0, "", $pid)
        $open = _MemOpen($pid)
        $song = _MemRead($open, 0x0012ADF5)
        msgbox(0, "Song", $song)
        _MemClose($pid)
    EndIf
EndFunc;~~>Songname

it should only get the played song out of winamp :lmao:

ideas?

[font="Verdana"]In work:[list=1][*]InstallIt[*]New version of SpaceWar[/list] [/font]

Link to post
Share on other sites
  • 3 months later...

ideas?

Func GetSong(); Adresse: 0012ADF5
    If ProcessExists("WinAmp.exe") Then
        $pid = ProcessExists("WinAmp.exe")
;~         msgbox(0, "", $pid)
        If $pid Then
            $open = _MemOpen( $pid )
            $song = _MemRead( $open, 0x00469380, 256 )
            $file = _MemRead( $open, 0x00469840, 256 )
            _MemClose( $open )
            $Msg = ""
            $Msg2 = ""
            For $i = 0 to 255
                $Msg = $Msg & chr( $song[$i] )
                $Msg2 = $Msg2 & chr( $file[$i] )
            Next
            msgbox( 0, $Msg, $Msg2 )
        EndIf
    EndIf
EndFunc;~~>Songname
Edited by A. Percy

Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator[center]VW Bug user[/center]Pinheiral (Pinewood) city: http://pt.wikipedia.org/wiki/Pinheiral

Link to post
Share on other sites
  • 2 weeks later...

Using Cheat Engine 5.2 i can determin the health of a selected mob is 872

Cheat Engine Details of this data are:

Address = 0CB425D0 Type = 4 Bytes Value = 872

Reading through the forum i have used the following script to read this in AutoIt

#include <mem.au3>

$Process = 'test.exe' ;-> Target process
$PID = ProcessExists($Process) ;-> Get Process ID
$Address = 0x0CB425D0 ;-> Read/write address


$OpenProcess = _MemOpen(0x38, False, $PID) ;-> Enable reading/writing to the process and get the handle

    $v_Read = _MemRead($OpenProcess, $Address, 1) ;-> Read a 1 byte value from the defined address
    MsgBox(0,"Info", "The value of address "&HEX($Address, 8)&" is now: "&$v_Read)

_MemClose($OpenProcess) ;-> Disable reading/writing to the processoÝ÷ Øíz¸º)]x(­Ê&¦)^¶nÞ±Êâ¦Ö§vØ^»§Ø­+Þ²Ø^~e£§­¦ëSåZç¨|]­ë,Ð xÛôÉèÃ]8!ø©àzØ^r^¶®¶­sbb33c·eõ&VBÒôÖVÕ&VBb33c´÷Vå&ö6W72Âb33c´FG&W72ÂB
as the value in Cheat engine is 4 Bytes

I then get:

The Value of Address 0CB425D0 is now: h

The output i expected and what it should be is -- The Value of Address 0CB425D0 is now: 872

What am i doing wrong ? :whistle:

Link to post
Share on other sites
  • 2 weeks later...

Has anyone seen the memory address change from one computer to another computer. I have checked and the address is the same every time on my pc, but it appears to be a different address on a different computer.

Does this mean the static address is different on every computer for the same program? Lets say from a laptop to desktop computer are their differences in the memory use....? Weird I have never seen this problem.

Any help would be great!

Thx

Mad

Edited by madmax
Link to post
Share on other sites
  • 4 weeks later...

Hi chaps,

Well I'm allwais trying to get my problems sorted out by my self. But this time i have to ask you guys.

I trying to make anti cheting engine for Warcrft II FT and I stuck with first step :whistle: I have alocated whre in memory are stored loged user name and i nead to read it. For finding corect address I was using ArtMonkey. And address loks like this: 01323100. Value at this address is text "Slaughter" starting from first byte. So i wirted my script but i always give me a zero.....

I cheked my script few times.... Maybe its posible that memory isnt accesible for some seciuryti reasons? Because even some mem editors dosent find war3 proces.

First i thaugt taht addres is wrong I tried 01323100, 0x01323100, 0x1323100 and so on.... no results...

#include <mem_fnc.au3>
#include <array.au3>
$Process = "war3.exe"
$Pid = ProcessExists($Process)
$h_open = _MemOpen($pid)
$Read = _MemRead($h_open,0x1323100,8)
If IsArray($Read) Then
    _ArrayDisplay($Read, "Read Var" )
EndIf
_MemClose($h_open)
Link to post
Share on other sites

can you include ";"s so I can understand what is going on. I understand as a whole that it is basically a few functions for reading writing allocating memory and opening processes (dunno if I missed any but meh), but I'd like you to explain more clearly please.

http://www.autoitscript.com/forum/index.php?showtopic=19329

here is all what im including

All post moved out to

http://www.autoitscript.com/forum/index.ph...mp;#entry319289

Link to post
Share on other sites
  • 2 weeks later...

What dose it mean the max is open none are open wtf???

C:\Documents and Settings\kcd\Desktop\muhacking\inc.au3 (4) : ==> Unable to open file, the maximum number of open files has been exceeded.:

Local $av_Return[2] = [DllOpen('kernel32.dll') ]

Visit mEMy programs made.Iul - IulG-V Console - G-V Console_RandomLetter - _RandomLetter()Saftey Kill - Saftey Killcolorzone() = colorzone()
Link to post
Share on other sites

Everything ruturns blank.

$process=ProcessExists ("program.exe") 
$mem = _MemOpen($process)
$yd=_MemRead($mem,0xa9907af,2)
$xd=_MemRead($mem,0xa9907cf,2)
MsgBox(0,$mem,$yd&" "&$xd)
$msg=_MemRead($mem,0x736FFD4,50)
MsgBox(0,$msg,$msg)
Edited by kcd-clan
Visit mEMy programs made.Iul - IulG-V Console - G-V Console_RandomLetter - _RandomLetter()Saftey Kill - Saftey Killcolorzone() = colorzone()
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...