Anmeldungsdatum: Mai 2008
Beiträge: 5
|
Ich hab damals für Warrock Hacks geschrieben, doch wie schreibt man den so das der auf einen anderen Prozess zugreift und dort die Adressen verändert?
Das war bisher mein Modul:
TEXT Code: Public Const string5 = &H1F0FFF Dim f1holder As Integer Dim timer_pos As Long 'API Declaration Public Declare Function GetWindowThreadProcessId Lib "user32" Alias "GetWindowThreadProcessId" (ByVal hWnd As Long, lpdwProcessId As Long) As Long Public Declare Function OpenProcess Lib "kernel32" Alias "OpenProcess" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long Public Declare Function WriteProcessMemory Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long Public Declare Function CloseHandle Lib "kernel32" Alias "CloseHandle" (ByVal hObject As Long) As Long Public Declare Function FindWindowA Lib "user32" Alias "FindWindowA" (ByVal Classname As String, ByVal WindowName As String) As Long Public Declare Function GetAsyncKeyState Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer Public Declare Function ReadProcessMemory Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByRef lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long Public Function WriteALong(string1 As String, string2 As Long, string3 As Long) 'WriteALong Dim hWnd As Long Dim pid As Long Dim phandle As Long hWnd = FindWindowA(vbNullString, string1) If (hWnd = 0) Then End Exit Function End If GetWindowThreadProcessId hWnd, pid phandle = OpenProcess(string5, False, pid) If (phandle = 0) Then Exit Function End If WriteProcessMemory phandle, string2, string3, 4, 0& CloseHandle string6 End Function Public Function ReadALong(string1 As String, string2 As Long, string4 As Long) 'ReadALong Dim hWnd As Long Dim pid As Long Dim phandle As Long hWnd = FindWindowA(vbNullString, string1) If (hWnd = 0) Then End Exit Function End If GetWindowThreadProcessId hWnd, pid phandle = OpenProcess(string5, False, pid) If (phandle = 0) Then Exit Function End If ReadProcessMemory phandle, string2, string4, 4, 0& CloseHandle string6 End Function Public Function ReadAFloat(string1 As String, string2 As Long, string4 As Single) 'ReadAFloat Dim hWnd As Long Dim pid As Long Dim phandle As Long hWnd = FindWindowA(vbNullString, string1) If (hWnd = 0) Then End Exit Function End If GetWindowThreadProcessId hWnd, pid phandle = OpenProcess(string5, False, pid) If (phandle = 0) Then Exit Function End If ReadProcessMemory phandle, string2, string4, 4, 0& CloseHandle string6 End Function Public Function WriteAFloat(string1 As String, string2 As Long, string3 As Single) 'WriteAFloat Dim hWnd As Long Dim pid As Long Dim phandle As Long hWnd = FindWindowA(vbNullString, string1) If (hWnd = 0) Then End Exit Function End If GetWindowThreadProcessId hWnd, pid phandle = OpenProcess(string5, False, pid) If (phandle = 0) Then Exit Function End If WriteProcessMemory phandle, string2, string3, 4, 0& CloseHandle string6 End Function Public Function WriteAByte(string1 As String, string2 As Long, string3 As Byte) 'WriteAByte Dim hWnd As Long Dim pid As Long Dim phandle As Long hWnd = FindWindowA(vbNullString, string1) If (hWnd = 0) Then End Exit Function End If GetWindowThreadProcessId hWnd, pid phandle = OpenProcess(string5, False, pid) If (phandle = 0) Then Exit Function End If WriteProcessMemory phandle, string2, string3, 1, 0& CloseHandle string6 End Function Public Function ReadAByte(string1 As String, string2 As Long, string4 As Byte) 'ReadAByte Dim hWnd As Long Dim pid As Long Dim phandle As Long hWnd = FindWindowA(vbNullString, string1) If (hWnd = 0) Then End Exit Function End If GetWindowThreadProcessId hWnd, pid phandle = OpenProcess(string5, False, pid) If (phandle = 0) Then Exit Function End If ReadProcessMemory phandle, string2, string4, 1, 0& CloseHandle string6 End Function
Müsste ich nur den Verweis auf das zu verändernde Spiel ändern? Hat jemand en Tipp?
|