Da ich schon gesagt habe, dass es weitere TuTs geben wird, will ich nicht lange warten lassen und gleich loslegen...
Was brauch ich:
- Microsoft Visual Basic
- Logischen Verstand
- Eine gültige Adresse
Wie gehts:
1.Wir öffnen Visual Basic (in meinem Falle 2010 Express) und erstellen ein neues Projekt, eine Windows Forms Anwendung:
2.Nun editieren wir auf unseres leeres GUI 1 Button und eine TextBox und nenne den Button, wie wir wollen (man kann den Namen natürlich auch so lassen)
3.Jetzt gehen wir oben in der Leiste auf "Projekt", dann auf "Element hinzufügen"...
5.Nun wählen wir aus, dass wir eine neue Klasse erstellen und nennen sie "Memory.vb"
6.In diese Klasse fügen wir folgenden Code ein, um zu definieren, was folgende Anweisungen im Script der Form zu bedeuten haben...
Code:
Public Class Memory
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
Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Public RBuff As Long
Public RBuff2 As Single
Public RBuff3 As Integer
Public Function Writememory(ByVal ProcessName As Process, ByVal Address As Integer, ByVal Value As Long, ByVal Bytes As Integer)
Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)
If GameLookUp.Length = 0 Then
End
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)
WriteProcessMemory(processHandle, Address, Value, Bytes, Nothing)
CloseHandle(processHandle)
Return True
End Function
Public Function ReadFloat(ByVal ProcessName As Process, ByVal Address As Single)
Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)
If GameLookUp.Length = 0 Then
End
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)
ReadProcessMemory(processHandle, Address, RBuff, 4, Nothing)
CloseHandle(processHandle)
Return RBuff
End Function
Public Function WriteFloat(ByVal ProcessName As Process, ByVal Address As Integer, ByVal Value As Single)
Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)
If GameLookUp.Length = 0 Then
End
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)
WriteFloatMemory(processHandle, Address, Value, 4, Nothing)
CloseHandle(processHandle)
Return True
End Function
Public Function ReadLong(ByVal ProcessName As Process, ByVal Address As Integer)
Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)
If GameLookUp.Length = 0 Then
End
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)
ReadProcessMemory(processHandle, Address, RBuff, 4, Nothing)
CloseHandle(processHandle)
Return RBuff
End Function
Public Function ReadFloatPointer(ByVal ProcessName As Process, ByVal Base As Integer, ByVal Offset As Short)
Dim fullAddress As Long
Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)
If GameLookUp.Length = 0 Then
End
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)
ReadProcessMemory(processHandle, Base, RBuff, 4, Nothing)
fullAddress = RBuff + Offset
ReadFloat(processHandle, fullAddress, RBuff2, 4, Nothing)
Return RBuff2
CloseHandle(processHandle)
End Function
Public Function ReadLongPointer(ByVal ProcessName As Process, ByVal Base As Integer, ByVal Offset As Short, ByVal Bytes As Integer)
Dim fullAddress As Long
Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)
If GameLookUp.Length = 0 Then
End
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)
ReadProcessMemory(processHandle, Base, RBuff, 4, Nothing)
fullAddress = RBuff + Offset
ReadProcessMemory(processHandle, fullAddress, RBuff3, Bytes, Nothing)
Return RBuff3
CloseHandle(processHandle)
End Function
Public Function WriteFloatPointer(ByVal ProcessName As Process, ByVal Base As Integer, ByVal Offset As Short, ByVal Value As Single)
Dim fullAddress As Long
Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)
If GameLookUp.Length = 0 Then
End
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)
ReadProcessMemory(processHandle, Base, RBuff, 4, Nothing)
fullAddress = RBuff + Offset
WriteFloatMemory(processHandle, fullAddress, Value, 4, Nothing)
CloseHandle(processHandle)
Return True
End Function
Public Function WriteLongPointer(ByVal ProcessName As Process, ByVal Base As Integer, ByVal Offset As Short, ByVal Value As Long, ByVal Bytes As Integer)
Dim fullAddress As Long
Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)
If GameLookUp.Length = 0 Then
End
Code:
Public Class Form1
Code:
Dim Mem As New Memory
Code:
Dim Procs() = Process.GetProcessesByName("S4Client")
Do Until Procs.Length = 1
Procs = Process.GetProcessesByName("S4Client")
Application.DoEvents()
Loop
Code:
Mem.WriteFloat(Procs(0), [COLOR="Red"]&HC1232[/COLOR], Single.Parse(TextBox1.Text, System.Globalization.NumberFormatInfo.InvariantInfo))
Code:
[COLOR="Red"]&HC1232[/COLOR]
Code:
&HC98E5
Ich hoffe dieses TuT hat euch ein wenig Einblick in das Coden mit VB.Net gegeben 
Greez
BeFresh
Greez
BeFresh






