Results 1 to 11 of 11
  1. #1
    dezer's Avatar
    Join Date
    Nov 2006
    Gender
    male
    Posts
    285
    Reputation
    12
    Thanks
    4
    My Mood
    Aggressive

    [Tutorial] How to VB.Net your trainer

    Hello MPGH. I was writing module for VB.Net cause kyos tut interested me. However in kyo tut it was pretty strange lol. And there were a lot of problems with it. So i wrote a module, becouse copying and pasting code between subs and buttons sux, doesnt it? Now u will be able to change memory in 1 line of text (for pointers u'll need more :P). Pointers same as for VB6, read then add the offset and voila.

    However reading isnt the same, here i got public variables storing read values. It is better becouse u dont need to declare variable every time u wanna read from some address. So reading will look like this (for byte, 2bytes, 4bytes, 8bytes):
    Code:
    ReadMemory(“someapp”, &Haddress)
    Textbox1.Text = vBuffer
    and for float:
    Code:
    ReadFloat(“someapp”, &Haddress)
    Textbox1.Text = vBufferS
    but before u can put ur greedy fingers on my module u need to figure out some parts of it. They were replaced with xxxxxx. Without figuring it out module won't work. Don't worry, errors displayed by VB will help you

    And here comes the module:

    Code:
    Option Explicit On
    Imports System
    Imports System.diagnostics
    Module ReadWriteMem
        Public vBuffer As Long 'public variable storing read values for Byte, 2 Bytes 4 Bytes and 8 Bytes
        Public vBufferS As Single 'public variable to store read floating point values
    
        'stuff
        Public Declare Function KeyPressed Lib "user32" Alias "GetAsyncKeyState" (ByVal Key As Integer) As Integer
        Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
        'reading
        Private Declare Function ReadMem Lib "kernel32" Alias "xxxxxx" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByRef buffer As Long, ByVal size As Int32, ByRef lpNumberOfBytesRead As Int32) As Boolean
        Private Declare Function ReadFloat Lib "kernel32" Alias "xxxxxx” (ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByRef buffer As Single, ByVal size As Int32, ByRef lpNumberOfBytesRead As Int32) As Boolean
        'writing
        Private Declare Function WriteMem Lib "kernel32" Alias "xxxxxx" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByVal buffer() As Long, ByVal size As Int32, ByRef lpNumberOfBytesRead As Int32) As Boolean
        Private Declare Function WriteFloat Lib "kernel32" Alias "xxxxxx " (ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByVal buffer() As Single, ByVal size As Int32, ByRef lpNumberOfBytesRead As Int32) As Boolean
    
        Private appProcess As Process
    
        Private Function SetProcess(ByVal ProcessName As String) As Boolean
            Dim processes As Process() = Process.GetProcessesByName(ProcessName)
            If (processes.Length > 0) Then
                appProcess = processes(0)
                Return True
            Else
                Return False
            End If
        End Function
    
        Public Function WriteMemory(ByVal appName As String, ByVal address As Integer, ByVal value As Object, ByVal bytes As Integer)
            If SetProcess((xxxxxx)) = False Then
                MsgBox(xxxxxx & " not found.", MsgBoxStyle.Critical, "Error")
                End
                Exit Function
            End If
    
            Dim buffer() As Long = New Long(0) {value}
    
            Return WriteMem(xxxxxxx.Handle, address, buffer, bytes, Nothing)
    
            CloseHandle(xxxxxxx.Handle)
        End Function
    
        Public Function ReadMemory(ByVal appName As String, ByVal address As Integer, ByVal bytes As Integer)
            If SetProcess((xxxxxxx)) = False Then
                MsgBox(xxxxxxx & " not found.", MsgBoxStyle.Critical, "Error")
                End
                Exit Function
            End If
    
            ReadMem(xxxxxxx.Handle, address, vBuffor, bytes, Nothing)
    
            Return vBuffer
    
            CloseHandle(xxxxxxx.Handle)
        End Function
    
        Public Function WriteFloat(ByVal appName As String, ByVal address As Integer, ByVal value As Single)
            If SetProcess((xxxxxx)) = False Then
                MsgBox(xxxxxx & " not found.", MsgBoxStyle.Critical, "Error")
                End
                Exit Function
            End If
    
            Dim buffer() As Single = New Single() {value}
    
            Return WriteFloat(xxxxxxx.Handle, address, buffer, 142, Nothing)
    
            CloseHandle(xxxxxxx.Handle)
        End Function
    
        Public Function ReadFloat(ByVal appName As String, ByVal address As Integer)
            If SetProcess((xxxxxx)) = False Then
                MsgBox(xxxxxx & " not found.", MsgBoxStyle.Critical, "Error")
                End
                Exit Function
            End If
    
            ReadMem(xxxxxxx.Handle, address, vBufferS, 834, Nothing)
    
            Return vBufferS
    
            CloseHandle(xxxxxxx.Handle)
        End Function
    
    End Module
    There are no comments since a few days ago my comp crashed and i lost whole module. When rewritting i didnt want to bother rewriting them.

    btw except for xxxxxx-ed parts there are 2 code traps. :P But while reading u should notice them since they are kinda obvious (if u understand the code)
    Last edited by dezer; 07-08-2007 at 03:27 PM.
    Quote Originally Posted by killerofsake987 View Post
    wuts search button
    owned

  2. #2
    Grim09's Avatar
    Join Date
    Jun 2007
    Location
    Russia - Россия - Rusland
    Posts
    337
    Reputation
    10
    Thanks
    167
    Thanks for posting. I'll start messing around with VB.Net right now.

  3. #3
    j00g0t0wn's Avatar
    Join Date
    May 2007
    Location
    In the HAX0Rmainserver..
    Posts
    121
    Reputation
    9
    Thanks
    8
    Cheers for posting the TUT ill have to try it out sometime maybe tommorrow

  4. #4
    dezer's Avatar
    Join Date
    Nov 2006
    Gender
    male
    Posts
    285
    Reputation
    12
    Thanks
    4
    My Mood
    Aggressive
    well if u find the xxxxxx-ed parts too hard to figure out, just say it, i'll try to make it easier or consider removing it completely..
    Quote Originally Posted by killerofsake987 View Post
    wuts search button
    owned

  5. #5
    webtijn's Avatar
    Join Date
    May 2007
    Gender
    male
    Posts
    168
    Reputation
    10
    Thanks
    3
    Omg, n00bz..
    Yesterday: VB6
    Today: VB.NET
    Tomorrow: C++
    Day after: C#
    Day after: Java
    Day after: Delphi
    Day after: Pascal
    Day after ....

    Nice tut, but do we realy need a tut for every language ? |-)
    Some people own, some doesn't. No mather what hack theire using.

  6. #6
    nbr1dan's Avatar
    Join Date
    Mar 2007
    Location
    At my computer
    Posts
    168
    Reputation
    14
    Thanks
    15
    Nice, Thanks man!

  7. #7
    dezer's Avatar
    Join Date
    Nov 2006
    Gender
    male
    Posts
    285
    Reputation
    12
    Thanks
    4
    My Mood
    Aggressive
    @webtijn
    yes we do
    Quote Originally Posted by killerofsake987 View Post
    wuts search button
    owned

  8. #8
    dezer's Avatar
    Join Date
    Nov 2006
    Gender
    male
    Posts
    285
    Reputation
    12
    Thanks
    4
    My Mood
    Aggressive
    As i cant edit my post after such long time so i post the whole module here (no xxxx parts, i dont care anymore)
    Code:
    '------------------------------------------------
    'Module written by dezer
    '------------------------------------------------
    
    Option Explicit On
    Imports System
    Imports System.diagnostics
    Module ReadWriteMem
        Public vBuffer As Long 'public variable storing read values
        Public vBufferS As Single 'public variable to store read floating point values
    
        'stuff
        Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Integer, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Integer) As Integer
        Public Declare Function KeyPressed Lib "user32" Alias "GetAsyncKeyState" (ByVal Key As Integer) As Integer
        Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
        'reading
        Private Declare Function ReadMem Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByRef buffer As Long, ByVal size As Int32, ByRef lpNumberOfBytesRead As Int32) As Boolean
        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
        'writing
        Private Declare Function WriteMem Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByVal buffer() As Long, ByVal size As Int32, ByRef lpNumberOfBytesRead As Int32) As Boolean
        Private Declare Function WriteFloat Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByVal buffer() As Single, ByVal size As Int32, ByRef lpNumberOfBytesRead As Int32) As Boolean
    
        Private appProcess As Process
    
        Private Function SetProcess(ByVal ProcessName As String) As Boolean
            Dim processes As Process() = Process.GetProcessesByName(ProcessName)
            If (processes.Length > 0) Then
                appProcess = processes(0)
                Return True
            Else
                Return False
            End If
        End Function
    
        Public Function WriteMemory(ByVal appName As String, ByVal address As Integer, ByVal value As Object, ByVal bytes As Integer)
            If SetProcess((appName)) = False Then
                MsgBox(appName & " not found.", MsgBoxStyle.Critical, "Error")
    
                End
                Exit Function
            End If
    
            Dim buffer() As Long = New Long(0) {value}
    
            Return WriteMem(appProcess.Handle, address, buffer, bytes, Nothing)
    
            CloseHandle(appProcess.Handle)
        End Function
    
        Public Function ReadMemory(ByVal appName As String, ByVal address As Integer, ByVal bytes As Integer)
            If SetProcess((appName)) = False Then
                MsgBox(appName & " not found.", MsgBoxStyle.Critical, "Error")
                End
                Exit Function
            End If
    
            ReadMem(appProcess.Handle, address, vBuffer, bytes, Nothing)
    
            Return vBuffer
    
            CloseHandle(appProcess.Handle)
        End Function
    
        Public Function WriteFloat(ByVal appName As String, ByVal address As Integer, ByVal value As Single)
            If SetProcess((appName)) = False Then
                MsgBox(appName & " not found.", MsgBoxStyle.Critical, "Error")
                End
                Exit Function
            End If
    
            Dim buffer() As Single = New Single() {value}
    
            Return WriteFloat(appProcess.Handle, address, buffer, 4, Nothing)
    
            CloseHandle(appProcess.Handle)
        End Function
    
        Public Function ReadFloat(ByVal appname As String, ByVal address As Integer)
            If SetProcess((appname)) = False Then
                MsgBox(appname & " not found.", MsgBoxStyle.Critical, "Error")
                End
                Exit Function
            End If
    
            ReadMem(appProcess.Handle, address, vBufferS, 4, Nothing)
    
            Return vBufferS
    
            CloseHandle(appProcess.Handle)
        End Function
    
    End Module
    just give me credits in your trainers...
    Quote Originally Posted by killerofsake987 View Post
    wuts search button
    owned

  9. #9
    Elliwood's Avatar
    Join Date
    May 2007
    Gender
    male
    Location
    Netherlands
    Posts
    459
    Reputation
    16
    Thanks
    11
    thx very much mate. Really wanted this for a long time. Going to make a new hack now.




    Give me rep i you like my hacks.

  10. #10
    Elliwood's Avatar
    Join Date
    May 2007
    Gender
    male
    Location
    Netherlands
    Posts
    459
    Reputation
    16
    Thanks
    11
    How can I Freeze a value in Visual studio 2005? I canĀ“t put a timer on interval 0. Then it gives me an error. What should I use instead?




    Give me rep i you like my hacks.

  11. #11
    Vahe's Avatar
    Join Date
    Jul 2007
    Location
    California
    Posts
    198
    Reputation
    9
    Thanks
    3
    thanks ill try it later

Similar Threads

  1. [Tutorial] How to make your own undetected module in VB6
    By markfracasso11 in forum Visual Basic Programming
    Replies: 17
    Last Post: 10-15-2007, 09:34 AM
  2. How to get your trainer detected
    By juppeli in forum WarRock - International Hacks
    Replies: 18
    Last Post: 10-09-2007, 09:52 AM
  3. Replies: 8
    Last Post: 07-09-2007, 03:15 PM
  4. [TUTORIAL]how to VB.net 2005 Trainers (Incl. secure passwords)
    By kyo in forum WarRock - International Hacks
    Replies: 20
    Last Post: 07-06-2007, 09:42 PM
  5. (Request) A tutorial on how to extract addresses from trainers
    By englishpom in forum WarRock - International Hacks
    Replies: 9
    Last Post: 05-19-2007, 10:14 PM