{Frage}Multipointer einbinden aber wie?

09/02/2010 15:40 maxi39#16
so gibt es keine fehlermeldung aba am wert tut sich nichts -_-
funktion funktioniert auch, der beep ton kommt

PHP Code:
#RequireAdmin
#include <Pointer.au3>

HotKeySet("{F1}", "_start")


 
$open = _memoryopen(ProcessExists("mc2.exe"))
$baseaddr = _MemoryGetBaseAddress($open, 1)
 
$static = Dec("000174D81")
 
$adresse = "0x" & Hex($baseaddr + $static)
Global 
$offset[6] = [0, 0, Dec("10"), 0, Dec("C"), Dec("34")]

Func _start()
Beep(909,654)
AdlibRegister(_MemoryPointerWrite($adresse, $open, $offset, "3", 'float'))

EndFunc

While 1
Sleep
(100)
WEnd 
09/02/2010 19:31 maxi39#17
So jetzt hab ich eine msgbox hinzugefügt, aber der zeigt mir nur den wert 0 an, muss ich vorher pointerread verwenden?

PHP Code:
#RequireAdmin
#include <Pointer.au3>

HotKeySet("{F1}", "_start")


 
$open = _memoryopen(ProcessExists("mc2.exe"))
$baseaddr = _MemoryGetBaseAddress($open, 1)
 
$static = Dec("000174D81")
 
$adresse = "0x" & Hex($baseaddr + $static)
Const 
$offset[6] = [0,0, Dec("78"), 0, Dec("C"), Dec("4")]

Func _start()
Beep(909,654)


$a=AdlibRegister(_MemoryPointerWrite($adresse, $open, $offset, "4000", 'float'))

MsgBox(0,"",""&$a&"")
EndFunc

While 1
Sleep
(100)
WEnd 
09/02/2010 20:24 omer36#18
PHP Code:
    $pRead = _MemoryPointerRead($adresse, $open, $offset, "float") 
    
MsgBox("","",$pRead) 
09/02/2010 20:45 maxi39#19
Quote:
Originally Posted by omer36 View Post
PHP Code:
    $pRead = _MemoryPointerRead($adresse, $open, $offset, "float") 
    
MsgBox("","",$pRead) 
kommt nichts raus, kann man überhaupt CE multipointer in autoit einfügen
09/02/2010 21:06 omer36#20
Quote:
Originally Posted by maxi39 View Post
kommt nichts raus, kann man überhaupt CE multipointer in autoit einfügen
sicher, dass du die adresse und so richtig hast??

auszug aus meinem teleport hack..

PHP Code:
;;;;
$xyzPointer = 0x106507E8
Global $xOffset[5] = [0, 0x1C, 0x10, 0x4, 0x54]
Global 
$yOffset[5] = [0, 0x1C, 0x10, 0x4, 0x5C]
Global 
$zOffset[5] = [0, 0x1C, 0x10, 0x4, 0x58]
;;;;
Case 
$TeleportButton
AdlibRegister
(_MemoryPointerWrite($xyzPointer, $Open, $xOffset, GUICtrlRead($xNeu), "float"))
AdlibRegister(_MemoryPointerWrite($xyzPointer, $Open, $yOffset, GUICtrlRead($yNeu), "float"))
AdlibRegister(_MemoryPointerWrite($xyzPointer, $Open, $zOffset, GUICtrlRead($zNeu), "float"))
;;;;
$pX = _MemoryPointerRead($xyzPointer, $Open, $xOffset, "float")
$pY = _MemoryPointerRead($xyzPointer, $Open, $YOffset, "float")
$pZ = _MemoryPointerRead($xyzPointer, $Open, $ZOffset, "float")
;;; 
09/02/2010 21:37 maxi39#21
ja, ich hab doch auch ein bild bei meinen multipointer im first post...
kannste vlt deine pointer.au3 hochladen vlt hab ich ne beta version oda so was
09/02/2010 21:47 Superx321#22
grad zufallsweise reingeklickt hier... also...
PHP Code:
#RequireAdmin
#include <Pointer.au3>
$Prozessname = "mc2.exe"
$Static =Dec("2C8FC0")
Global 
$Offset[5] = [0, 0x10, 0,0xC, 0x34]

$Open_Process = _MemoryOpen(ProcessExists($Prozessname))
$BaseAdress = _MemoryModuleGetBaseAddress(ProcessExists($Prozessname),$Prozessname)
$BasePointer = "0x" & Hex($BaseAdress + $Static,6)



$Read1 = _MemoryPointerRead($BasePointer, $Open_Process, $Offset)
$Write1 = _MemoryPointerWrite($BasePointer, $Open_Process, $Offset, 10, "dword")
$Read2 =  _MemoryPointerRead($BasePointer, $Open_Process, $Offset)

msgbox(0, "Ausgabe", "Grund Base: 0x" & Hex($BaseAdress,6) & @CRLF & "Static Base: 0x" & Hex($static, 6) & @CRLF & "Gerechnete Base: 0x" & $BasePointer & @CRLF & "Zu beschreibende Adresse: " & $Read2[0] & @CRLF & "Ausgelesener Wert vorher: " & $Read1[1] & @CRLF & "Schreibe Wert..." & @CRLF & "Ausgelesener Wert nachher: " & $Read2[1] & @CRLF)

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")
Local $hProcess
Local $PERMISSION 
= BitOR(0x0002, 0x0400, 0x0008, 0x0010, 0x0020)
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
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 
Mal ausführen, die msgbox gibt paar sachen zurück. wenn immernoch nicht mehr, mach mal ein screen von dem pointer, wie er in Ce drinn ist und geht.
09/02/2010 22:12 maxi39#23
hier ma ein bild vom pointer wie der aussieht wenn ich das spiel geöffnet habe.


[Only registered and activated users can see links. Click Here To Register...]
09/03/2010 01:14 KDeluxe#24
PHP Code:
#RequireAdmin
#include <Pointer.au3>

HotKeySet("{F1}", "_Read")

$PID = ProcessExists("mc2.exe")
If 
$PID > 0 Then
    $Handle 
= _MemoryOpen($PID)
    
$Address = _MemoryGetBaseAddress($Handle, 1)
    
$Address = "0x" & Hex($Address + Dec("174D81"))
    
Dim $Offset[6] = [0, 0, 0x10, 0, 0x1D0, 0x10]
Else
    Exit
EndIf

While 
True
    Sleep
(10)
WEnd

Func _Read
()
    
$Read = _MemoryPointerRead($Address, $Handle, $Offset)
    
MsgBox(0, "", $Read[1])
EndFunc 
09/03/2010 13:03 maxi39#25
RESULT von der MsgBox = 0, bei CE aber wird 100 angezeigt, auch wenn $Read = _MemoryPointerRead($Address, $Handle, $Offset) zu $Read = _MemoryPointerRead($Address, $Handle, $Offset , "float") umänder wenn man aber mit CE einen trainer erstellt und den multipointer auswählt , funktioniert alles ich mein, dann funktioniert das mit autoit immer noch nicht aber ich kann mit dem ce trainer die value ändern
09/03/2010 16:04 Superx321#26
Was gibt die msgbox im meinem Script aus?

Und sonst, das hier von KD:

PHP Code:
#RequireAdmin
#include <Pointer.au3>

HotKeySet("{F1}", "_Read")

$PID = ProcessExists("mc2.exe")
If 
$PID > 0 Then
    $Handle 
= _MemoryOpen($PID)
    
$Address = _MemoryModuleGetBaseAddress(ProcessExists("mc2.exe"), "mc2.exe")
    
$Address = "0x" & Hex($Address + Dec("174D81"))
    
Dim $Offset[6] = [0, 0, 0x10, 0, 0x1D0, 0x10]
Else
    Exit
EndIf

While 
True
    Sleep
(10)
WEnd

Func _Read
()
    
$Read = _MemoryPointerRead($Address, $Handle, $Offset)
    
MsgBox(0, "", $Read[1])
EndFunc

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")
Local $hProcess
Local $PERMISSION 
= BitOR(0x0002, 0x0400, 0x0008, 0x0010, 0x0020)
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
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 
habs bisschen geändert, probiers mal so
09/03/2010 16:32 maxi39#27
Quote:
Originally Posted by Superx321 View Post
Was gibt die msgbox im meinem Script aus?

Und sonst, das hier von KD:

PHP Code:
#RequireAdmin
#include <Pointer.au3>

HotKeySet("{F1}", "_Read")

$PID = ProcessExists("mc2.exe")
If 
$PID > 0 Then
    $Handle 
= _MemoryOpen($PID)
    
$Address = _MemoryModuleGetBaseAddress(ProcessExists("mc2.exe"), "mc2.exe")
    
$Address = "0x" & Hex($Address + Dec("174D81"))
    
Dim $Offset[6] = [0, 0, 0x10, 0, 0x1D0, 0x10]
Else
    Exit
EndIf

While 
True
    Sleep
(10)
WEnd

Func _Read
()
    
$Read = _MemoryPointerRead($Address, $Handle, $Offset)
    
MsgBox(0, "", $Read[1])
EndFunc

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")
Local $hProcess
Local $PERMISSION 
= BitOR(0x0002, 0x0400, 0x0008, 0x0010, 0x0020)
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
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 
habs bisschen geändert, probiers mal so
ja gibt den richtigen wert wieder, aber leider als 4byte, dword
wenn ich aber überall das dword änder zu float, dann kommt 0 raus
09/03/2010 16:53 Superx321#28
Quote:
Originally Posted by maxi39 View Post
ja gibt den richtigen wert wieder, aber leider als 4byte, dword
wenn ich aber überall das dword änder zu float, dann kommt 0 raus
Du musst nicht jedes dword zu float ändern... nur das memread... habs mal geändert

PHP Code:
#RequireAdmin
#include <Pointer.au3>

HotKeySet("{F1}", "_Read")

$PID = ProcessExists("mc2.exe")
If 
$PID > 0 Then
    $Handle 
= _MemoryOpen($PID)
    
$Address = _MemoryModuleGetBaseAddress(ProcessExists("mc2.exe"), "mc2.exe")
    
$Address = "0x" & Hex($Address + Dec("174D81"))
    
Dim $Offset[6] = [0, 0, 0x10, 0, 0x1D0, 0x10]
Else
    Exit
EndIf

While 
True
    Sleep
(10)
WEnd

Func _Read
()
    
$Read = _MemoryPointerRead($Address, $Handle, $Offset, "float")
    
MsgBox(0, "", $Read[1])
EndFunc

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")
Local $hProcess
Local $PERMISSION 
= BitOR(0x0002, 0x0400, 0x0008, 0x0010, 0x0020)
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
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 
09/03/2010 17:03 maxi39#29
nice funktioniert, und jetzt als verkürzten script? hab grad ein wenig rum probiert, hat aber net geklappt
09/03/2010 17:21 KDeluxe#30
Pack "_MemoryModuleGetBaseAddress" in eine UDF, oder benutze die Methode, die ich gepostet habe:
PHP Code:
#RequireAdmin
#include <Pointer.au3>

HotKeySet("{F1}", "_Read")

$PID = ProcessExists("mc2.exe")
If 
$PID > 0 Then
    $Handle 
= _MemoryOpen($PID)
    
$Address = _MemoryGetBaseAddress($Handle, 1)
    
$Address = "0x" & Hex($Address + Dec("174D81"))
    
Dim $Offset[6] = [0, 0, 0x10, 0, 0x1D0, 0x10]
Else
    Exit
EndIf

While 
True
    Sleep
(10)
WEnd

Func _Read
()
    
$Read = _MemoryPointerRead($Address, $Handle, $Offset, "float")
    
MsgBox(0, "", $Read[1])
EndFunc