Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 16:16

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



_MemoryPointerRead (autoit) in delphi

Discussion on _MemoryPointerRead (autoit) in delphi within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2008
Posts: 143
Received Thanks: 73
_MemoryPointerRead (autoit) in delphi

Hallo epvp coder Gruppe

Ich hänge derzeit an folgendem Problem:
In auto-it konnte man mit der "_MemoryPointerRead" Funktion einen Wert aus dem Speicher auslesen, zu dem man nur über einen Pointer(mit Offsets usw.) kommt.

Nachdem ich in einem anderem Forum keinen fand, der davon Ahnung hatte, frage ich hier:
Gibt es soetwas auch in Delphi? Ich verwende derzeit die Funktion
"ReadProcessMemory", die jedoch nur Werte aus statischen Adressen auslesen kann, was also sogut wie garnichts bringt.

Hier mal die Funktion in autoit:
Func _MemoryPointerRead ($iv_Address, $ah_Handle, $av_Offset, $sv_Type = 'dword')

If IsArray($av_Offset) Then
If IsArray($ah_Handle) Then
Local $iv_PointerCount = UBound($av_Offset) - 1
Else
SetError(2)
Return 0
EndIf
Else
SetError(1)
Return 0
EndIf

Local $iv_Data[2], $i
Local $v_Buffer = DllStructCreate('dword')

For $i = 0 to $iv_PointerCount

If $i = $iv_PointerCount Then
$v_Buffer = DllStructCreate($sv_Type)
If @Error Then
SetError(@Error + 2)
Return 0
EndIf

$iv_Address = '0x' & hex($iv_Data[1] + $av_Offset[$i])
DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
If @Error Then
SetError(7)
Return 0
EndIf

$iv_Data[1] = DllStructGetData($v_Buffer, 1)

ElseIf $i = 0 Then
DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
If @Error Then
SetError(7)
Return 0
EndIf

$iv_Data[1] = DllStructGetData($v_Buffer, 1)

Else
$iv_Address = '0x' & hex($iv_Data[1] + $av_Offset[$i])
DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
If @Error Then
SetError(7)
Return 0
EndIf

$iv_Data[1] = DllStructGetData($v_Buffer, 1)

EndIf

Next

$iv_Data[0] = $iv_Address

Return $iv_Data

EndFunc


Bitte um Hilfe, mfg infY
infY2k7 is offline  
Old 05/21/2008, 17:05   #2
 
mr.rattlz's Avatar
 
elite*gold: 0
Join Date: Aug 2005
Posts: 896
Received Thanks: 334
Die von die gepostete Funktion benutzt doch auch nur ReadProcessMemory oder nicht?
Wenn du nur die Adresse von einem Pointer hast, dann liest du halt mit ReadProcessMemory diese Adresse und nimmst dann den Pointer als Adresse um mit ReadProcessMemory zu lesen.
mr.rattlz is offline  
Old 05/21/2008, 17:39   #3
 
elite*gold: 0
Join Date: May 2008
Posts: 143
Received Thanks: 73
nein, ich hab die adresse vom pointer und dazu 2 offsets(siehe bild) die frage ist nun, wie ich delphi dazu bringe, die offsets mit zu beachten...
infY2k7 is offline  
Old 05/22/2008, 00:14   #4
 
elite*gold: 0
Join Date: Nov 2007
Posts: 439
Received Thanks: 75
Ja, so etwas gibs in delphi, frag die member von DP .
wadimwadim is offline  
Old 05/22/2008, 11:02   #5
 
mr.rattlz's Avatar
 
elite*gold: 0
Join Date: Aug 2005
Posts: 896
Received Thanks: 334
Jetzt verstehe ich endlich, was du vorhast, das ist nahezu das selbe, nur, dass du dein Offset halt draufaddierst. Addition sollte für gewöhnlich aber keine Magie sein
mr.rattlz is offline  
Old 05/22/2008, 13:58   #6
 
reijin's Avatar
 
elite*gold: 20
Join Date: Feb 2006
Posts: 3,174
Received Thanks: 1,152
wie rattlz schon sagte:
du liest den wert den der pointer hat aus.
du addierst zum erhaltenen wert den offset-wert -> du erhälst die momentane Adresse
readprocessmemory auf die über den pointer gefundene adresse ansetzen - fertig
reijin is offline  
Old 05/23/2008, 14:03   #7
 
elite*gold: 0
Join Date: May 2008
Posts: 143
Received Thanks: 73
Thumbs up

Quote:
Originally Posted by Reijin View Post
wie rattlz schon sagte:
du liest den wert den der pointer hat aus.
du addierst zum erhaltenen wert den offset-wert -> du erhälst die momentane Adresse
readprocessmemory auf die über den pointer gefundene adresse ansetzen - fertig
bämmm das wars!! ich hab nur die adresse des pointers mit dem offset addiert, ich muss den wert addieren!! thx
infY2k7 is offline  
Reply


Similar Threads Similar Threads
DELPHI - Who make Exploits, Hacks and Tools with DELPHI?
05/15/2013 - CO2 Programming - 13 Replies
Hi all. Iwith DELPHI, but a dont now. hello, I use Delphi to program and i like someone put here source code of make Exploits, Hacks and Tools bot here, or part of the code. ty to all
Direct Injection Codes - Delphi/C++/AutoIt
11/08/2011 - PW Hacks, Bots, Cheats, Exploits - 49 Replies
Since all pro people here is a bit selfish... i decided to made my own guide and share with the forum!! OK... This is the best way to make your bot or whatever you making work well for you!!! STOP being eMo and just changing addresses!! Lets play hard!!!:D ALL INFORMATION HERE IS BASED ON PERFECT WORLD INTERNACIONAL (LAST VERSION) Before Start:
AutoIT to Delphi Translation - 50 $
06/27/2010 - AutoIt - 0 Replies
Please delete.
Recht einfache Frage..DLL in Delphi und Autoit
08/28/2009 - General Coding - 5 Replies
Hi, ich hab hier eine ziemliche Anfängerfrage :o Und zwar will ich mich langsam mit DLL´s befassen. Nur leider hab ich da noch einige probleme. Mein Code: Die DLL function TestG (x: integer): integer; export;



All times are GMT +2. The time now is 16:16.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.