Quote:
Originally Posted by ax5
ok so now all i need is read memory :mofo:
|
Ok first of all you need the Imports & dec's
Code:
Imports System.Runtime.InteropServices
Imports System.Text
Public Class Form1
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer
Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
Private Declare Function WriteFloatMemory Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Single, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
Private Declare Function ReadFloat Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByRef buffer As Single, ByVal size As Int32, ByRef lpNumberOfBytesRead As Int32) As Boolean
Private Declare Function ReadProcessMemory Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Integer) As Integer
Private Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal nVirtKey As Integer) As Short
Private Const VK_SPACE = &H20
Public Healthwath As Long
Public Healthwath2 As Single
Public Healthwath3 As Integer
This is the Function of ReadProcessMemory, basicly you can Read everything if you have the right adresses.
Code:
Public Function HealthHack()
Dim processname As Process() = Process.GetProcessesByName("name")
If processname.Length > 0 Then
Dim processname_1 As Process = hl2(0)
Dim readHandle As IntPtr = OpenProcess(&H10, False, CUInt(processname_1.Id))
ReadProcessMemory(readHandle, &HADRESSHERE, Healthwath, 4, Nothing)
CloseHandle(readHandle)
End If
Return HealthHack()
End Function
Then add a Timer to your form (interval = 100MS (should be enaugh for HP))
and then just add the function as the label text.
example:
Code:
label1.text = HealthHack()
And yea, a little
anti copy&paste has been added ;), dont be lazy! :D