Visual Basic .Net module

X-STUFF

Mitglied
Hallo
ich würde gerne wissen wie man für Visual Basic .Net (2008)
ein Module erstellen kann bzw. selber schreiben.
Wichtig währe WriteaLong, WriteaFlot, WriteaFloat und NOP
Danke
 
Zuletzt bearbeitet:
Ich hab jetzt 2 gefunden, doch wie macht man das es auf ein bestimmtes programm bezogen wird?

Code:
Public Const E1087E8287EH9 = &H1F0FFF
Public Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hWnd As IntPtr, ByRef lpdwProcessId As Integer) As Integer
Public Declare Function GetKeyPress Lib "user32"Alias "GetAsyncKeyState"(ByVal key As Long) As Integer
Public Declare Function FindWin Lib "user32"Alias"FindWindowA" (ByVal Classname As String, ByVal WindowName As String) As IntPtr
Public Declare Function OpenProcess Lib "kernel32 "(ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As IntPtr
Public Declare Function CloseHandle Lib "kernel32" (ByVal hObject As IntPtr) As Integer
Public Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Short, ByVal lpNumberOfBytesWritten As Integer) As Integer
Public Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Short, ByVal lpNumberOfBytesWritten As Integer) As Integer




Public Function writeafloat(byval FH8EG108108B9IF11 as string, byval E4I44FC8FFI3B5 as long,byval G329G6DH3EA3 as long)
Dim IC1BCGC128G92 As Long
Dim F6CCHB1E9EH9 As Long
Dim CGFDF67AIA7G8 as long
IC1BCGC128G92 = FindWin(Nothing,FH8EG108108B9IF11)
GetWindowThreadProcessID IC1BCGC128G92,F6CCHB1E9EH9
CGFDF67AIA7G8 = OpenProcess(E1087E8287EH9,false,F6CCHB1E9EH9)
WriteProcessMemory(CGFDF67AIA7G8,E4I44FC8FFI3B5,G329G6DH3EA3,4,0&)
Return 0
End Function
Public Function readafloat(byval FH8EG108108B9IF11 as string, byval E4I44FC8FFI3B5 as long,byval G329G6DH3EA3 as long)
Dim IC1BCGC128G92 As Long
Dim F6CCHB1E9EH9 As Long
Dim CGFDF67AIA7G8 as long
IC1BCGC128G92 = FindWin(Nothing,FH8EG108108B9IF11)
GetWindowThreadProcessID IC1BCGC128G92,F6CCHB1E9EH9
CGFDF67AIA7G8 = OpenProcess(E1087E8287EH9,false,F6CCHB1E9EH9)
ReadProcessMemory(CGFDF67AIA7G8,E4I44FC8FFI3B5,G329G6DH3EA3,4,0&)
Return 0
End Function
Public Function writealong(byval FH8EG108108B9IF11 as string, byval E4I44FC8FFI3B5 as long,byval G329G6DH3EA3 as long)
Dim IC1BCGC128G92 As Long
Dim F6CCHB1E9EH9 As Long
Dim CGFDF67AIA7G8 as long
IC1BCGC128G92 = FindWin(Nothing,FH8EG108108B9IF11)
GetWindowThreadProcessID IC1BCGC128G92,F6CCHB1E9EH9
CGFDF67AIA7G8 = OpenProcess(E1087E8287EH9,false,F6CCHB1E9EH9)
WriteProcessMemory(CGFDF67AIA7G8,E4I44FC8FFI3B5,G329G6DH3EA3,4,0&)
Return 0
End Function
Public Function readalong(byval FH8EG108108B9IF11 as string, byval E4I44FC8FFI3B5 as long,byval G329G6DH3EA3 as long)
Dim IC1BCGC128G92 As Long
Dim F6CCHB1E9EH9 As Long
Dim CGFDF67AIA7G8 as long
IC1BCGC128G92 = FindWin(Nothing,FH8EG108108B9IF11)
GetWindowThreadProcessID IC1BCGC128G92,F6CCHB1E9EH9
CGFDF67AIA7G8 = OpenProcess(E1087E8287EH9,false,F6CCHB1E9EH9)
ReadProcessMemory(CGFDF67AIA7G8,E4I44FC8FFI3B5,G329G6DH3EA3,4,0&)
Return 0
End Function
Public Function readabyte(byval FH8EG108108B9IF11 as string, byval E4I44FC8FFI3B5 as long,byval G329G6DH3EA3 as long)
Dim IC1BCGC128G92 As Long
Dim F6CCHB1E9EH9 As Long
Dim CGFDF67AIA7G8 as long
IC1BCGC128G92 = FindWin(Nothing,FH8EG108108B9IF11)
GetWindowThreadProcessID IC1BCGC128G92,F6CCHB1E9EH9
CGFDF67AIA7G8 = OpenProcess(E1087E8287EH9,false,F6CCHB1E9EH9)
ReadProcessMemory(CGFDF67AIA7G8,E4I44FC8FFI3B5,G329G6DH3EA3,1,0&)
Return 0
End Function
Public Function writeabyte(byval FH8EG108108B9IF11 as string, byval E4I44FC8FFI3B5 as long,byval G329G6DH3EA3 as long)
Dim IC1BCGC128G92 As Long
Dim F6CCHB1E9EH9 As Long
Dim CGFDF67AIA7G8 as long
IC1BCGC128G92 = FindWin(Nothing,FH8EG108108B9IF11)
GetWindowThreadProcessID IC1BCGC128G92,F6CCHB1E9EH9
CGFDF67AIA7G8 = OpenProcess(E1087E8287EH9,false,F6CCHB1E9EH9)
WriteProcessMemory(CGFDF67AIA7G8,E4I44FC8FFI3B5,G329G6DH3EA3,1,0&)
Return 0
End Function

und

Code:
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 Address As Integer, ByVal Value As Long, ByVal Bytes As Integer)

Dim warrockLookUp As Process() = Process.GetProcessesByName("WarRock")

If warrockLookUp.Length = 0 Then

End

End If

Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, warrockLookUp(0).Id)

WriteProcessMemory(processHandle, Address, Value, Bytes, Nothing)

CloseHandle(processHandle)

End Function

Public Function ReadFloat(ByVal Address As Single)

Dim warrockLookUp As Process() = Process.GetProcessesByName("WarRock")

If warrockLookUp.Length = 0 Then

End

End If

Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, warrockLookUp(0).Id)

ReadProcessMemory(processHandle, Address, RBuff, 4, Nothing)

CloseHandle(processHandle)

Return RBuff

End Function

Public Function WriteFloat(ByVal Address As Integer, ByVal Value As Single)

Dim warrockLookUp As Process() = Process.GetProcessesByName("WarRock")

If warrockLookUp.Length = 0 Then

End

End If

Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, warrockLookUp(0).Id)

WriteFloatMemory(processHandle, Address, Value, 4, Nothing)

CloseHandle(processHandle)

End Function

Public Function ReadLong(ByVal Address As Integer)

Dim warrockLookUp As Process() = Process.GetProcessesByName("WarRock")

If warrockLookUp.Length = 0 Then

End

End If

Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, warrockLookUp(0).Id)

ReadProcessMemory(processHandle, Address, RBuff, 4, Nothing)

CloseHandle(processHandle)

Return RBuff

End Function

Public Function ReadFloatPointer(ByVal Base As Integer, ByVal Offset As Short)

Dim fullAddress As Long

Dim warrockLookUp As Process() = Process.GetProcessesByName("WarRock")

If warrockLookUp.Length = 0 Then

End

End If

Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, warrockLookUp(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 Base As Integer, ByVal Offset As Short, ByVal Bytes As Integer)

Dim fullAddress As Long

Dim warrockLookUp As Process() = Process.GetProcessesByName("WarRock")

If warrockLookUp.Length = 0 Then

End

End If

Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, warrockLookUp(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 Base As Integer, ByVal Offset As Short, ByVal Value As Single)

Dim fullAddress As Long

Dim warrockLookUp As Process() = Process.GetProcessesByName("WarRock")

If warrockLookUp.Length = 0 Then

End

End If

Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, warrockLookUp(0).Id)

ReadProcessMemory(processHandle, Base, RBuff, 4, Nothing)

fullAddress = RBuff + Offset

WriteFloatMemory(processHandle, fullAddress, Value, 4, Nothing)

CloseHandle(processHandle)

End Function

Public Function WriteLongPointer(ByVal Base As Integer, ByVal Offset As Short, ByVal Value As Long, ByVal Bytes As Integer)

Dim fullAddress As Long

Dim warrockLookUp As Process() = Process.GetProcessesByName("WarRock")

If warrockLookUp.Length = 0 Then

End

End If

Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, warrockLookUp(0).Id)

ReadProcessMemory(processHandle, Base, RBuff, 4, Nothing)

fullAddress = RBuff + Offset

WriteProcessMemory(processHandle, fullAddress, Value, Bytes, Nothing)

CloseHandle(processHandle)

End Function

Public Function NOP(ByVal Address As Integer, ByVal value As Integer)

Dim warrockLookUp As Process() = Process.GetProcessesByName("WarRock")

If warrockLookUp.Length = 0 Then

End

End If

Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, warrockLookUp(0).Id)

WriteProcessMemory(processHandle, Address, value, 1, Nothing)

CloseHandle(processHandle)

End Function
 

Neue Beiträge

Zurück