OldSchoolHack

Register / Login English

Hacks in VB6 für offline Games. Wie macht mans richtig?


icon Hacks in VB6 für offline Games. Wie macht mans richtig? #1

Join Date: May 2008

Posts: 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:
  1. Public Const string5 = &H1F0FFF
  2. Dim f1holder As Integer
  3. Dim timer_pos As Long
  4.  
  5. 'API Declaration
  6. Public Declare Function GetWindowThreadProcessId Lib "user32" Alias "GetWindowThreadProcessId" (ByVal hWnd As Long, lpdwProcessId As Long) As Long
  7. Public Declare Function OpenProcess Lib "kernel32" Alias "OpenProcess" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
  8. 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
  9. Public Declare Function CloseHandle Lib "kernel32" Alias "CloseHandle" (ByVal hObject As Long) As Long
  10. Public Declare Function FindWindowA Lib "user32" Alias "FindWindowA" (ByVal Classname As String, ByVal WindowName As String) As Long
  11. Public Declare Function GetAsyncKeyState Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer
  12. 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
  13.  
  14. Public Function WriteALong(string1 As String, string2 As Long, string3 As Long) 'WriteALong
  15. Dim hWnd As Long
  16. Dim pid As Long
  17. Dim phandle As Long
  18. hWnd = FindWindowA(vbNullString, string1)
  19. If (hWnd = 0) Then
  20. End
  21. Exit Function
  22. End If
  23. GetWindowThreadProcessId hWnd, pid
  24. phandle = OpenProcess(string5, False, pid)
  25. If (phandle = 0) Then
  26. Exit Function
  27. End If
  28. WriteProcessMemory phandle, string2, string3, 4, 0&
  29. CloseHandle string6
  30. End Function
  31.  
  32. Public Function ReadALong(string1 As String, string2 As Long, string4 As Long) 'ReadALong
  33. Dim hWnd As Long
  34. Dim pid As Long
  35. Dim phandle As Long
  36. hWnd = FindWindowA(vbNullString, string1)
  37. If (hWnd = 0) Then
  38. End
  39. Exit Function
  40. End If
  41. GetWindowThreadProcessId hWnd, pid
  42. phandle = OpenProcess(string5, False, pid)
  43. If (phandle = 0) Then
  44. Exit Function
  45. End If
  46. ReadProcessMemory phandle, string2, string4, 4, 0&
  47. CloseHandle string6
  48. End Function
  49.  
  50. Public Function ReadAFloat(string1 As String, string2 As Long, string4 As Single) 'ReadAFloat
  51. Dim hWnd As Long
  52. Dim pid As Long
  53. Dim phandle As Long
  54. hWnd = FindWindowA(vbNullString, string1)
  55. If (hWnd = 0) Then
  56. End
  57. Exit Function
  58. End If
  59. GetWindowThreadProcessId hWnd, pid
  60. phandle = OpenProcess(string5, False, pid)
  61. If (phandle = 0) Then
  62. Exit Function
  63. End If
  64. ReadProcessMemory phandle, string2, string4, 4, 0&
  65. CloseHandle string6
  66. End Function
  67.  
  68. Public Function WriteAFloat(string1 As String, string2 As Long, string3 As Single) 'WriteAFloat
  69. Dim hWnd As Long
  70. Dim pid As Long
  71. Dim phandle As Long
  72. hWnd = FindWindowA(vbNullString, string1)
  73. If (hWnd = 0) Then
  74. End
  75. Exit Function
  76. End If
  77. GetWindowThreadProcessId hWnd, pid
  78. phandle = OpenProcess(string5, False, pid)
  79. If (phandle = 0) Then
  80. Exit Function
  81. End If
  82. WriteProcessMemory phandle, string2, string3, 4, 0&
  83. CloseHandle string6
  84. End Function
  85.  
  86. Public Function WriteAByte(string1 As String, string2 As Long, string3 As Byte) 'WriteAByte
  87. Dim hWnd As Long
  88. Dim pid As Long
  89. Dim phandle As Long
  90. hWnd = FindWindowA(vbNullString, string1)
  91. If (hWnd = 0) Then
  92. End
  93. Exit Function
  94. End If
  95. GetWindowThreadProcessId hWnd, pid
  96. phandle = OpenProcess(string5, False, pid)
  97. If (phandle = 0) Then
  98. Exit Function
  99. End If
  100. WriteProcessMemory phandle, string2, string3, 1, 0&
  101. CloseHandle string6
  102. End Function
  103.  
  104. Public Function ReadAByte(string1 As String, string2 As Long, string4 As Byte) 'ReadAByte
  105. Dim hWnd As Long
  106. Dim pid As Long
  107. Dim phandle As Long
  108. hWnd = FindWindowA(vbNullString, string1)
  109. If (hWnd = 0) Then
  110. End
  111. Exit Function
  112. End If
  113. GetWindowThreadProcessId hWnd, pid
  114. phandle = OpenProcess(string5, False, pid)
  115. If (phandle = 0) Then
  116. Exit Function
  117. End If
  118. ReadProcessMemory phandle, string2, string4, 1, 0&
  119. CloseHandle string6
  120. End Function
  121.  

Müsste ich nur den Verweis auf das zu verändernde Spiel ändern?
Hat jemand en Tipp?

icon #2

Join Date: Aug 2007

Posts: 8643

User-Rating:

199 positive
33 negative
wenn du doch "damals" Hacks für Warrock "geschrieben" hast, dann solltest du doch wissen, was zu ändern ist...

greetz KN4CK3R

__________________

Hallo
icon #3

Join Date: Nov 2007

Posts: 2801

Warrock und WriteProcessMemory klappt ehh nicht mehr...


mfg
Aldi

__________________

[RELEASES]
[INSURGENCY] OSH Memory Hack Download
[NEXT RELEASES]
[MULTI - Source Engine Mods] OSH Memory Hack [Vorschläge Hier]

http://misscreativeclassy.files.wordpress.com/2009/06/dubai-souk-aldi-dubai.png