Tutorial Formbox executing an offset
#1
1. open a new project and call it mw2 mp trainer or something like that what you prefer-> forms application or whatever the name is
goto the tab window [...]explorer -> right click "add" - "module"

Code:
Module Module1 #region "Declarations" Private Declare Function OpenProcess Lib "kernel32" Alias "OpenProcess" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer Private Declare Function WriteProcessMemory Lib "kernel32" Alias "WriteProcessMemory" (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" Alias "CloseHandle" (ByVal hObject As Integer) As Integer Private string1 As Long Private string2 As Integer Private RBuff1 As Long Private RBuff2 As Single Private RBuff3 As Integer #end region #Region "Check Process/ReadDll" Private Function readdll(ByVal modulename As String) Dim procmodule As ProcessModule Dim constant1 As Integer Dim constant2 As Long Dim constant3 As Process() = Process.GetProcessesByName("iw4mp") If constant3.Length = 0 Then Return 0 End If For Each procmodule In constant3(0).Modules If modulename = procmodule.ModuleName Then constant1 = procmodule.BaseAddress End If Next constant2 = constant1 Return constant2 End Function Public Function IsProcessOpen(ByVal name As String) As Boolean For Each clsProcess As Process In Process.GetProcesses If clsProcess.ProcessName.Contains(name) Then Return True End If Next ' Do nothing Return False End Function #end region #Region "Hacks" 'WriteMemory Private Function WriteMemory(ByVal Address As Integer, ByVal Value As Long, ByVal Bytes As Integer) Dim iw4mpLookUp As Process() = Process.GetProcessesByName("iw4mp") If iw4mpLookUp.Length = 0 Then End End If Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, iw4mpLookUp(0).Id) WriteProcessMemory(processHandle, Address, Value, Bytes, Nothing) CloseHandle(processHandle) Return Nothing End Function 'WriteFloat Private Function WriteFloat(ByVal Address As Integer, ByVal Value As Single) Dim iw4mpLookUp As Process() = Process.GetProcessesByName("iw4mp") If iw4mpLookUp.Length = 0 Then End End If Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, iw4mpLookUp(0).Id) WriteFloatMemory(processHandle, Address, Value, 4, Nothing) CloseHandle(processHandle) Return Nothing End Function 'NOP Private Function NOP(ByVal Address As Integer, ByVal value As Integer) Dim iw4mpLookUp As Process() = Process.GetProcessesByName("iw4mp") If iw4mpLookUp.Length = 0 Then End End If Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, iw4mpLookUp(0).Id) WriteProcessMemory(processHandle, Address, value, 1, Nothing) CloseHandle(processHandle) Return Nothing End Function #End region #Region "Functions" Public Function WriteMemory(ByVal address As String, ByVal value As Long, ByVal bytes As Byte) If IsProcessOpen("iw4mp") Then string1 = readdll("cshell.dll") string2 = "&H" & Hex(string1 + address) WriteMemory(string2, value, bytes) End If Return Nothing End Function Public Function floath4x(ByVal address As String, ByVal value As Long) If IsProcessOpen("iw4mp") Then string1 = readdll("cshell.dll") string2 = "&H" & Hex(string1 + address) WriteFloat(string2, value) End If Return Nothing End Function Public Function noph4x(ByVal address As String, ByVal value As Long) If IsProcessOpen("iw4mp") Then string1 = readdll("cshell.dll") string2 = "&H" & Hex(string1 + address) NOP(string2, value) End If Return Nothing End Function #end region End Module[/php] 2. add the form box [php]public class form1 private sub button1_click(byval sender as system.object, byval e as system.eventargs) handles button1.click WriteMemory(&H12BC89C, 2516000, 4) 'Exp code //click for level 70 end sub end class

u need to switch those offsets from c to vb, that means 0x -> &h

for example:
Code:
WriteMemory(&H645CDF8, 0, 4) 'Party_hostmigration WriteMemory(&H645CE08, 0, 4) 'Party_hostmigration WriteMemory(&H645CB78, 1, 4) 'Party_connecttimeout WriteMemory(&H645CB88, 1, 4) 'Party_connecttimeout WriteMemory(&H645E518, 0, 4) 'Badhost_endgameifisuck WriteMemory(&H645E528, 0, 4) 'Badhost_endgameifisuck

Code:
Public Class Form1 <DllImport("kernel32.dll")> _ Public Shared Function WriteProcessMemory( _ ByVal hProcess As IntPtr, _ ByVal lpBaseAddress As IntPtr, _ ByVal lpBuffer As Byte(), _ ByVal nSize As UInt32, _ ByRef lpNumberOfBytesWritten As UInt32 _ ) As Boolean End Function Dim hProcess As Process() = Process.GetProcessesByName("iw4mp") Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click WriteProcessMemory(hProcess(0).Handle, &H4393E0, New Byte() {255}, 4, 0) End Sub End Class
Reply

#2
Use [php] codetags please.
Reply

#3
fixed, but it destroyed the size of the thread
Reply

#4
Um you don't have to use modules if you installed Blubbs DLL unless your doing something else I can't really see code I'm on my iPod
Reply

#5
well not everybody has to use "blubbs" dll Wink
Reply

#6
Just Download it of MPGH

or upload it here doh
Reply

#7
Using a dll to use WPM is really a failure. If you need to do that you didn't get the idea of using the Windows API to keep your code small (unlike embedding a 3rd Party DLL)
Reply

#8
Oh ok thx super for the info
Reply

#9
Thanks so much guys i was looking for this a long time ago!!!Big Grin
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Current Map Offset Deviler86 7 6,412 09-03-2012, 09:47
Last Post: Pozzuh
  Read Client Offset Value or Text zraile 1 3,533 04-06-2012, 03:00
Last Post: Nukem
  [Request] blackops SP offset's rotceh_dnih 2 3,539 11-27-2011, 02:52
Last Post: rotceh_dnih
  [Release] Offset-Refinder aosma8 3 4,382 03-04-2011, 06:39
Last Post: aosma8

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2026 Melroy van den Berg.