Spieletrainer und Mods in VB

  • VB.NET

Es gibt 11 Antworten in diesem Thema. Der letzte Beitrag () ist von bla.

    Spieletrainer und Mods in VB

    Hallo liebe Community

    Ich habe mal wieder eine Frage:
    Ist es möglich einen Spieletrainer oder Mods für zum Beispiel GTA Vice City, oder Anno 1701, Need for Speed Most Wanted, ...?
    Und wenn ja, dann wie?

    Danke im vorraus
    Gruß Trabifreak
    Ich will jetzt wirklich keine Verwarnung bekommen. Aber versuchs mal mit CheatEngine, also da die Addressen herauszufinden, und wandel die addresse, beispiel: für lebenspunkte in einen Long um.
    Dann ist hier ein VB6 Code für's Memory Hacking:
    (Tipp: Any ist Object)
    Spoiler anzeigen

    VB.NET-Quellcode

    1. Public Const PROCESS_ALL_ACCESS = &H1F0FFF
    2. Dim f1holder As Integer
    3. Dim timer_pos As Long
    4. 'API Declaration
    5. Public Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hWnd As Long, lpdwProcessId As Long) As Long
    6. Public Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
    7. Public Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
    8. Public Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
    9. Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal Classname As String, ByVal WindowName As String) As Long
    10. Public Declare Function GetKeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer
    11. Public Declare Function ReadProcessMem 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
    12. Public Function WriteAByte(gamewindowtext As String, address As Long, value As Byte)
    13. Dim hWnd As Long
    14. Dim pid As Long
    15. Dim phandle As Long
    16. hWnd = FindWindow(vbNullString, gamewindowtext)
    17. If (hWnd = 0) Then
    18. MsgBox "The Game Is Not Working", vbCritical, "Error"
    19. End
    20. Exit Function
    21. End If
    22. GetWindowThreadProcessId hWnd, pid
    23. phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
    24. If (phandle = 0) Then
    25. MsgBox "Can't get ProcessId", vbCritical, "Error"
    26. Exit Function
    27. End If
    28. WriteProcessMemory phandle, address, value, 1, 0&
    29. CloseHandle hProcess
    30. End Function
    31. Public Function WriteAnInt(gamewindowtext As String, address As Long, value As Integer)
    32. Dim hWnd As Long
    33. Dim pid As Long
    34. Dim phandle As Long
    35. hWnd = FindWindow(vbNullString, gamewindowtext)
    36. If (hWnd = 0) Then
    37. MsgBox "The Game Is Not Working", vbCritical, "Error"
    38. End
    39. End If
    40. GetWindowThreadProcessId hWnd, pid
    41. phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
    42. If (phandle = 0) Then
    43. MsgBox "Can't get ProcessId", vbCritical, "Error"
    44. Exit Function
    45. End If
    46. WriteProcessMemory phandle, address, value, 2, 0&
    47. CloseHandle hProcess
    48. End Function
    49. Public Function WriteALong(gamewindowtext As String, address As Long, value As Long)
    50. Dim hWnd As Long
    51. Dim pid As Long
    52. Dim phandle As Long
    53. hWnd = FindWindow(vbNullString, gamewindowtext)
    54. If (hWnd = 0) Then
    55. MsgBox "The Game Is Not Working", vbCritical, "Error"
    56. End
    57. Exit Function
    58. End If
    59. GetWindowThreadProcessId hWnd, pid
    60. phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
    61. If (phandle = 0) Then
    62. MsgBox "Can't get ProcessId", vbCritical, "Error"
    63. Exit Function
    64. End If
    65. WriteProcessMemory phandle, address, value, 4, 0&
    66. CloseHandle hProcess
    67. End Function
    68. Public Function ReadAByte(gamewindowtext As String, address As Long, valbuffer As Byte)
    69. Dim hWnd As Long
    70. Dim pid As Long
    71. Dim phandle As Long
    72. hWnd = FindWindow(vbNullString, gamewindowtext)
    73. If (hWnd = 0) Then
    74. MsgBox "The Game Is Not Working", vbCritical, "Error"
    75. End
    76. Exit Function
    77. End If
    78. GetWindowThreadProcessId hWnd, pid
    79. phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
    80. If (phandle = 0) Then
    81. MsgBox "Can't get ProcessId", vbCritical, "Error"
    82. Exit Function
    83. End If
    84. ReadProcessMem phandle, address, valbuffer, 1, 0&
    85. CloseHandle hProcess
    86. End Function
    87. Public Function ReadAnInt(gamewindowtext As String, address As Long, valbuffer As Integer)
    88. Dim hWnd As Long
    89. Dim pid As Long
    90. Dim phandle As Long
    91. hWnd = FindWindow(vbNullString, gamewindowtext)
    92. If (hWnd = 0) Then
    93. MsgBox "The Game Is Not Working", vbCritical, "Error"
    94. End
    95. Exit Function
    96. End If
    97. GetWindowThreadProcessId hWnd, pid
    98. phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
    99. If (phandle = 0) Then
    100. MsgBox "Can't get ProcessId", vbCritical, "Error"
    101. Exit Function
    102. End If
    103. ReadProcessMem phandle, address, valbuffer, 2, 0&
    104. CloseHandle hProcess
    105. End Function
    106. Public Function ReadALong(gamewindowtext As String, address As Long, valbuffer As Long)
    107. Dim hWnd As Long
    108. Dim pid As Long
    109. Dim phandle As Long
    110. hWnd = FindWindow(vbNullString, gamewindowtext)
    111. If (hWnd = 0) Then
    112. MsgBox "The Game Is Not Working", vbCritical, "Error"
    113. End
    114. Exit Function
    115. End If
    116. GetWindowThreadProcessId hWnd, pid
    117. phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
    118. If (phandle = 0) Then
    119. MsgBox "Can't get ProcessId", vbCritical, "Error"
    120. Exit Function
    121. End If
    122. ReadProcessMem phandle, address, valbuffer, 4, 0&
    123. CloseHandle hProcess
    124. End Function
    125. Public Function ReadAFloat(gamewindowtext As String, address As Long, valbuffer As Single)
    126. Dim hWnd As Long
    127. Dim pid As Long
    128. Dim phandle As Long
    129. hWnd = FindWindow(vbNullString, gamewindowtext)
    130. If (hWnd = 0) Then
    131. MsgBox "The Game Is Not Working", vbCritical, "Error"
    132. End
    133. Exit Function
    134. End If
    135. GetWindowThreadProcessId hWnd, pid
    136. phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
    137. If (phandle = 0) Then
    138. MsgBox "Can't get ProcessId", vbCritical, "Error"
    139. Exit Function
    140. End If
    141. ReadProcessMem phandle, address, valbuffer, 4, 0&
    142. CloseHandle hProcess
    143. End Function
    144. Public Function WriteAFloat(gamewindowtext As String, address As Long, value As Single)
    145. Dim hWnd As Long
    146. Dim pid As Long
    147. Dim phandle As Long
    148. hWnd = FindWindow(vbNullString, gamewindowtext)
    149. If (hWnd = 0) Then
    150. MsgBox "The Game Is Not Working", vbCritical, "Error"
    151. End
    152. Exit Function
    153. End If
    154. GetWindowThreadProcessId hWnd, pid
    155. phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
    156. If (phandle = 0) Then
    157. MsgBox "Can't get ProcessId", vbCritical, "Error"
    158. Exit Function
    159. End If
    160. WriteProcessMemory phandle, address, value, 4, 0&
    161. CloseHandle hProcess
    162. End Function

    Trabifreak schrieb:

    Da sich die Addresse immer ändert

    Musst den Pointer suchen, wie das genau funktioniert weiß ich auch nicht mehr, hab das schon lange nicht mehr gemacht...(ich glaub bei Cheat Engine war das was mit: du wählst die jeweilige Adresse, dann Rechtsklick und dann auf 'Find out what writes to this address' oder so ähnlich...)