Jump to content

new _Mem functions


w0uter
 Share

Recommended Posts

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)
I get the same problem. If its for gme chek is realy autoit openig procees for accesing it. Or it may be memory protected program.
Link to comment
Share on other sites

  • 2 weeks later...

Hi there.

I have a question!

As i known, the _memOpen func returns String(text) value of memory.

My program, what i need to check memory, using Dinamic Memory Allocation, so i found some index'es in ArtMoney:

00CAF6D8 : 13269816

00CB0668 : 13267968

00CB1EA0 : 13271920

This index values returns requirement Adress, like: 00CA7B38. It's all into the ArtMoney program.

When im using _Memread(0x38,true/false,0x00CA7B38) it returns me valid string, of character name.

But when im trying to read Index-value (00CB0668 : 13267968), it returns me strange strings(but i need hexedemical, or integer values!) like "8{Ê" , instead of "13267968".

Please help!

Edited by Timur
Link to comment
Share on other sites

  • 2 weeks later...

I get the same problem. If its for gme chek is realy autoit openig procees for accesing it. Or it may be memory protected program.

I cant believe I finally found a Thread with more than only me having this problem. How do i check whether its "memory protected"? btw. i know that other people on this forum can and do access the app i try to with the same script i use. how is that possible?

any ideas?

Link to comment
Share on other sites

  • 3 months 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

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 ? :)

Nothing really you've done wrong here, except originally found the Dynamic Memory Address [DMA] for that Mob's Health, Next time you Zone or login it could be anything. There are a few tutorials Here and Here that explain the pricipals behind defeating DMA. You will essentially have to follow the assembly code to the static pointer address (address that doesn't change locations) and set your script to read from that pointer. Also things to keep in mind, you will need to do this with each update of the exe file as well. Best thing to do is don't update your main exe file with the patcher unless it makes you (you can not log in anymore unless you update). You can do this by running everquest2.exe (main game file) directly instead of using eq2.exe (patcher/loader). Hope this helps a bit on your journeys.
Link to comment
Share on other sites

  • 2 weeks later...

if you dont know how to use it it is not for you :)

I didn't know how to use it.

There is a UDF based on yours here

which I have used with success and I notice quite a few other people are using. This UDF has comments, more features and is easier to understand. I recommend it.

Now I know how to use it, but I won't. ;)

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

  • 2 months later...

I don't know if anyone has gotten the _Memalloc function to work... i sure didn't.

I've altered Wouters function slightly, now it returns the allocated base address:

;New function:
Func MemAlloc($i_hProcess, $i_Size, $i_Address = 0, $i_AT = 0x1000, $i_Protect = 0x40)
    Local $hDll = DllOpen("kernel32.dll")
        If @error Then
            SetError(1)
            Return 0
        EndIf
    $av_Alloc = DllCall($hDll, 'int', 'VirtualAllocEx', 'int',$i_hProcess, 'int', $i_Address, 'int', $i_Size, 'int', $i_AT, 'int', $i_Protect)
    Return $av_Alloc[0]
EndFunc

;Wouters functions:
Func MemOpen($i_dwDesiredAccess, $i_bInheritHandle, $i_dwProcessId)
    
    $ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', $i_dwDesiredAccess, 'int', $i_bInheritHandle, 'int', $i_dwProcessId)
    If @error Then
        SetError(1)
        Return 0
    EndIf
    
    Return $ai_Handle[0]
EndFunc;==> _MemOpen()

Func MemClose($i_hProcess)
    
    $av_CloseHandle = DllCall('kernel32.dll', 'int', 'CloseHandle', 'int', $i_hProcess)
    Return $av_CloseHandle[0]
    
EndFunc;==> _MemClose()

Example:

$Process = 'winmine.exe'
$PID = ProcessExists($Process) 
$OpenProcess = MemOpen(0x38, False, $PID)

$BaseAddress = MemAlloc($OpenProcess, 0x2000);<--Allocates 2000 bytes at first available space
MsgBox(0,"Info", "The allocated memory starts at address: "&HEX($BaseAddress, 8))
MemClose($OpenProcess)
Edited by faldo
Link to comment
Share on other sites

  • 5 years later...
  • Developers

Do it is possible to use this functions to fill all ram with zero?

Somehow your questions around this topic the last couple of days reminds me about a story that involves a gun and a foot. :)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Somehow your questions around this topic the last couple of days reminds me about a story that involves a gun and a foot. :)

You are right, can't remember this UDF has a _MEM("ReViVe", "Before", "2008") option :sorcerer:

Answers like these discourage anyone else using the search engine of the forum, of course, because if we find something with more than two years old, we have not yet received help and we are criticized!

What is the purpose of the search system if we can not post anything on old topics? Why not eliminate every topics that are two years old that did not add anything good to the forum?

Prefer to criticize rather than answering the question!

Goodbye everybody, I got tired of this system adopted here!

JS

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Link to comment
Share on other sites

  • Developers

Goodbye everybody, I got tired of this system adopted here!

I am totally ,lost as to the validity of my quoted text. I have stated this before and will again here: There is no issue posting in old topics as long as they are valid!

My comment was merely meant to warn Ontosy that asking these type of questions will lead shooting yourself in the foot. nothing more ... nothing less as in my humble opinion people should not be messing with the memory directly when they do not know what they are doing.

So when this upsets you then so be it....

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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 third post to a different thread on the same topic in short time, so I wouldn't have minded an even stronger response... but hey, Jos is one of the nice guys :)...

http://stackoverflow.com/questions/14062399/reset-and-zero-fill-unused-ram-in-c

Link to comment
Share on other sites

  • 4 weeks later...

I also find it better to revive an old topic than creating a new because the matter is already under way and it is easier to solve a than start from scratch again.

Link to comment
Share on other sites

  • 2 years later...

2 new functions. :lmao:

 

 

Func _MemAlloc($ah_Mem, $i_Size, $i_Address = 0, $i_AT = 4096, $i_Protect = 0x40)
    $av_Alloc = DllCall($ah_Mem[0], 'int', 'VirtualAllocEx', 'int', $ah_Mem[1], 'int', $i_Address, 'int', $i_Size, 'int', $i_AT, 'int', $i_Protect)
    Return $av_Alloc[0]
EndFunc  ;==>_MemAlloc

Func _MemFree($ah_Mem, $i_Address)
    $av_Free = DllCall($ah_Mem[0], 'int', 'VirtualFreeEx', 'int', $ah_Mem[1], 'int', $i_Address, 'int', 0, 'int', 0x8000)
    Return $av_Free[0]
EndFunc  ;==>_MemFree

$i_Open = _MemOpen(@AutoItPID)
$i_Alloc = _MemAlloc($i_Open, 7)
_MemWrite($i_Open, $i_Alloc, _MemHelper(119, 111, 117, 116, 101, 114, 0))
MsgBox(0, 'OmFg RoX0r', _MemRead($i_Open, $i_Alloc))
_MemFree($i_Open, $i_Alloc)
_MemClose($i_Open)

did i just miss _MemHelper function ?

cause always undefined function in mine

undefined.png

Link to comment
Share on other sites

did i just miss _MemHelper function ?

cause always undefined function in mine

undefined.png

When a function is undefined, its usually because you forgot to include the file containing the function, the file is missing, or you misspelled the function.

Also, This topic is 10 years old. Don't necro post. Make your own thread. You can always link back to this one.

 

 

Link to comment
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
 Share

  • Recently Browsing   0 members

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