|
You last visited: Today at 06:22
Advertisement
_memorygetbaseadress returns 0
Discussion on _memorygetbaseadress returns 0 within the AutoIt forum part of the Coders Den category.
09/30/2013, 23:21
|
#1
|
elite*gold: 3653
Join Date: Aug 2008
Posts: 30,854
Received Thanks: 529
|
_memorygetbaseadress returns 0
da ich mich grade ein wenig mit memory-"hacking" beschäftige und mit CE auch schon ein paar adressen rausgesucht hab, bin ich natürlich irgendwann nicht mehr um _memorygetbaseadress gestoßen.
nun habe ich aber das problem, dass diese funktion (bei mir aus der pointer.au3) immer 0 returned und @error auf 2 setzt
Code:
;===================================================================================================
; Function........: _MemoryGetBaseAddress($ah_Handle, $iHD)
;
; Description.....: Reads the 'Allocation Base' from the open process.
;
; Parameter(s)....: $ah_Handle - An array containing the Dll handle and the handle of the open
; process as returned by _MemoryOpen().
; $iHD - Return type:
; |0 = Hex (Default)
; |1 = Dec
;
; Requirement(s)..: A valid process ID.
;
; Return Value(s).: On Success - Returns the 'allocation Base' address and sets @Error to 0.
; On Failure - Returns 0 and sets @Error to:
; |1 = Invalid $ah_Handle.
; |2 = Failed to find correct allocation address.
; |3 = Failed to read from the specified process.
;
; Author(s).......: Nomad. Szhlopp.
; URL.............: http://www.autoitscript.com/forum/index.php?showtopic=78834
; Note(s).........: Go to Www.CheatEngine.org for the latest version of CheatEngine.
;===================================================================================================
Func _MemoryGetBaseAddress($ah_Handle, $iHexDec = 0)
Local $iv_Address = 0x00100000
Local $v_Buffer = DllStructCreate('dword;dword;dword;dword;dword;dword;dword')
Local $vData
Local $vType
If Not IsArray($ah_Handle) Then
SetError(1)
Return 0
EndIf
DllCall($ah_Handle[0], 'int', 'VirtualQueryEx', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer))
If Not @Error Then
$vData = Hex(DllStructGetData($v_Buffer, 2))
$vType = Hex(DllStructGetData($v_Buffer, 3))
While $vType <> "00000080"
DllCall($ah_Handle[0], 'int', 'VirtualQueryEx', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer))
$vData = Hex(DllStructGetData($v_Buffer, 2))
$vType = Hex(DllStructGetData($v_Buffer, 3))
If Hex($iv_Address) = "01000000" Then ExitLoop
$iv_Address += 65536
WEnd
If $vType = "00000080" Then
SetError(0)
If $iHexDec = 1 Then
Return Dec($vData)
Else
Return $vData
EndIf
Else
SetError(2)
Return 0
EndIf
Else
SetError(3)
Return 0
EndIf
EndFunc ;==>_MemoryGetBaseAddress
ich hab win 7-64bit und denke auch dass es daran liegt. habe schon etliche stunden google gequält aber bin dabei nicht wirklich zum erfolg gekommen.
hat einer evtl. eine idee woran es liegt, wie mans fixt, oder wie ich die baseadresse alternative bekomme? denn wenn ich das selbe script verwenden will ohne mir jedes mal die adresse selbst zu suchen bleibt das ned aus.
PS: ich habe schon alle möglichen .exen probiert. vom explorer bis zu meiner game.exe, error und return sind immer gleich. einen fehler im script davor kann ich ausschließen, ist ja nur pid lesen und mit memoryopen.
|
|
|
09/30/2013, 23:29
|
#2
|
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
|
Versuchs mal als x86 zu compilen mit #RequireAdmin drinne, vielleicht geht es dann.
|
|
|
09/30/2013, 23:32
|
#3
|
elite*gold: 3653
Join Date: Aug 2008
Posts: 30,854
Received Thanks: 529
|
ne, requireadmin is drin und hab auch schon beide arten compiled... x86 is ja eh by default
|
|
|
10/01/2013, 18:29
|
#4
|
elite*gold: 64
Join Date: May 2011
Posts: 1,229
Received Thanks: 854
|
Schonmal so probiert?:
Code:
#RequireAdmin
$pID = ProcessExists("Process.exe")
$Base = _MemoryModuleGetBaseAddress($pID, "Process.exe")
MsgBox(0,"","Base: " & $Base)
Func _MemoryModuleGetBaseAddress($iPID, $sModule)
If Not ProcessExists($iPID) Then Return SetError(1, 0, 0)
If Not IsString($sModule) Then Return SetError(2, 0, 0)
Local $PSAPI = DllOpen("psapi.dll")
;Get Process Handle
Local $hProcess
Local $PERMISSION = BitOR(0x0002, 0x0400, 0x0008, 0x0010, 0x0020) ; CREATE_THREAD, QUERY_INFORMATION, VM_OPERATION, VM_READ, VM_WRITE
If $iPID > 0 Then
Local $hProcess = DllCall("kernel32.dll", "ptr", "OpenProcess", "dword", $PERMISSION, "int", 0, "dword", $iPID)
If $hProcess[0] Then
$hProcess = $hProcess[0]
EndIf
EndIf
;EnumProcessModules
Local $Modules = DllStructCreate("ptr[1024]")
Local $aCall = DllCall($PSAPI, "int", "EnumProcessModules", "ptr", $hProcess, "ptr", DllStructGetPtr($Modules), "dword", DllStructGetSize($Modules), "dword*", 0)
If $aCall[4] > 0 Then
Local $iModnum = $aCall[4] / 4
Local $aTemp
For $i = 1 To $iModnum
$aTemp = DllCall($PSAPI, "dword", "GetModuleBaseNameW", "ptr", $hProcess, "ptr", Ptr(DllStructGetData($Modules, 1, $i)), "wstr", "", "dword", 260)
If $aTemp[3] = $sModule Then
DllClose($PSAPI)
Return Ptr(DllStructGetData($Modules, 1, $i))
EndIf
Next
EndIf
DllClose($PSAPI)
Return SetError(-1, 0, 0)
EndFunc
|
|
|
10/01/2013, 20:45
|
#5
|
elite*gold: 3653
Join Date: Aug 2008
Posts: 30,854
Received Thanks: 529
|
ja return ist nach wie vor 0 :/ aber danke für deine mühe
und müsste es nicht
Code:
$pID = _memoryopen(ProcessExists("Process.exe"))
sein? oder ist bei getMODULEbase die pid relevant und nicht das handle zum geöffneten prozess?
|
|
|
10/01/2013, 21:53
|
#6
|
elite*gold: 64
Join Date: May 2011
Posts: 1,229
Received Thanks: 854
|
Nope, so wie es ist stimmt das schon o.o.
Du musst nur Process.exe ändern
#Edit:
Für welches Spiel ist es denn?
|
|
|
10/01/2013, 21:56
|
#7
|
elite*gold: 3653
Join Date: Aug 2008
Posts: 30,854
Received Thanks: 529
|
hmm ok, naja dann liegts an was anderem :/, danke trotzdem
|
|
|
10/01/2013, 21:59
|
#8
|
elite*gold: 64
Join Date: May 2011
Posts: 1,229
Received Thanks: 854
|
Für welches Spiel ist es denn?
|
|
|
10/02/2013, 11:43
|
#9
|
elite*gold: 3653
Join Date: Aug 2008
Posts: 30,854
Received Thanks: 529
|
versuchen tu ichs mit dragons prophet aber ich krieg bei keiner exe was raus  . ums so zu sagen ich hab kein festes projekt hab mir nur gleich n mmo genommen um mir das mal beizubringen
|
|
|
10/03/2013, 09:14
|
#10
|
elite*gold: 15
Join Date: Oct 2007
Posts: 450
Received Thanks: 474
|
bei dragons prophet brauchst du es nicht versuchen du wirst dort kaum pionters finden die einen interresieren.
|
|
|
10/03/2013, 14:22
|
#11
|
elite*gold: 3653
Join Date: Aug 2008
Posts: 30,854
Received Thanks: 529
|
doch hab jetz schon ein paar, und dass ich die baseaddress nicht finden konnte lag (wahrscheinlich) daran dass ich "#AutoIt3Wrapper_UseX64=y" nicht drin hatte. hab da gestern noch sehr viel hilfe bekommen jetzt klappts =). jetzt versuch ich mal die koordinaten des spiels zu finden. stellt sich aber als schwierig heraus
|
|
|
 |
Similar Threads
|
FLyCraft Returns 25x/15x/75x
08/05/2013 - Flyff PServer Advertising - 44 Replies
Vorstellung wird überarbeitet. Server Erreichbar unter Flycraft.flyff.info
Server ist online (Thread ist geclosed bis ich ne Vernünftige Vorstellung geostet habe)
|
S4 Turnier - returns
09/14/2011 - S4 League - 100 Replies
Hiho,
sicher erinnern sich einige User hier daran, dass ich versucht habe ein Turnier in die Wege zu leiten.
Das möchte ich nun wieder versuchen, diesmal aber etwas anders, nämlich nicht nur mit der Deadline von einer Woche.
Ich werde diesem Topic eine Umfrage beifügen, dort könnt ihr abstimmen, wann es euch am liebsten wäre dieses Turnier zu starten.
Info's:
• Only Pen
|
Element returns as v2
06/27/2011 - CO2 PServer Archive - 9 Replies
Hello, as you might know I am Hadeset aka Tanel.
Me and Justin like to welcome you back to Element.
The accounts and characters have been wiped so we can have a fresh start again. If you are wondering why we are going version 2, then it is because the server kept crashing and the community was dying. However, we found out that the problem lied, as always, within mysql, and replacing one measly dll solved our problems.
So the rates will be the same as before:
Exp rate: 5x
Drops: Moderate...
|
BlackRose returns
04/01/2011 - Metin2 PServer Advertising - 187 Replies
http://www.abload.de/img/logo9ln0.png
BlackRose
BlackRose kommt nun wieder zurück, noch besser als je zuvor!
~Die Features~
Die Features sind eines der Hauptpunkte, die ein Server ausmacht. Natürlich wollen wir an diesem Punkt nicht sparen:
* Einige komplett neu geschriebene Quests wie beispielsweise die Wochenquest.
* Eine kleine Map, die nur zum Farmen erstellt worden ist.
* Krieger und Ninjas haben einen 6. Skill. Angriff+ und Flammenschlag wurden ersetzt.
|
[TOP] BK-201 SG Returns 24/7(Hamachi)
01/20/2010 - Private Server - 6 Replies
I’m going to show you all how to download and play this server.
Server Rates:
EXP: 100
Party:300
Droprate:500
Pet = 9999
24/7
Sever Features:
|
All times are GMT +1. The time now is 06:24.
|
|