Page 2 of 2 FirstFirst 12
Results 16 to 29 of 29
  1. #16
    Lovroman's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    9,430
    Reputation
    611
    Thanks
    9,710
    My Mood
    Cheerful
    Quote Originally Posted by getsuga121 View Post
    yes, i do, do you want it?
    You can give me it, but I can show you how to do this without correct address. .
    Did you copy & paste memory class in your main class ?
    If you did, add this code:

    Code:
    If Process_Handle("t6mp") Then
    WriteString(address,value) 
    End If
    Replace address with real address & value with real value.
    Don't forget to add &H in front of address(eg. &H0123456)

  2. #17
    getsuga121's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    39
    Reputation
    10
    Thanks
    39
    My Mood
    Sad
    Error 7 'Process_Handle' is not declared. It may be inaccessible due to its protection level. C:\Users\Getsuga121\Documents\Visual Studio 2010\Projects\Login1\Login1\trainer.vb 94 12 Login1
    Error 8 'WriteString' is not declared. It may be inaccessible due to its protection level. C:\Users\Getsuga121\Documents\Visual Studio 2010\Projects\Login1\Login1\trainer.vb 95 13 Login1

    i even added both classes and modules and get that

    code:
    clan:
    023049b0

    name:
    02304944
    that is 4d1 so.

  3. #18
    Lovroman's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    9,430
    Reputation
    611
    Thanks
    9,710
    My Mood
    Cheerful
    Quote Originally Posted by getsuga121 View Post
    Error 7 'Process_Handle' is not declared. It may be inaccessible due to its protection level. C:\Users\Getsuga121\Documents\Visual Studio 2010\Projects\Login1\Login1\trainer.vb 94 12 Login1
    Error 8 'WriteString' is not declared. It may be inaccessible due to its protection level. C:\Users\Getsuga121\Documents\Visual Studio 2010\Projects\Login1\Login1\trainer.vb 95 13 Login1

    i even added both classes and modules and get that

    code:
    clan:
    023049b0

    name:
    02304944
    that is 4d1 so.
    Seems that I already have this addresses
    No, use only one class.
    I prefer Jorndel's class(I used it in example).
    If you copied & pasted Jorndel's class, Process_Handle must be there...

  4. #19
    getsuga121's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    39
    Reputation
    10
    Thanks
    39
    My Mood
    Sad
    Ok i took out the other class, it still gives error about write string,etc and what do i use to edit normal integers like ammo because it is not in there.

  5. #20
    Lovroman's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    9,430
    Reputation
    611
    Thanks
    9,710
    My Mood
    Cheerful
    Quote Originally Posted by getsuga121 View Post
    Ok i took out the other class, it still gives error about write string,etc and what do i use to edit normal integers like ammo because it is not in there.

    Please copy whole code here.
    First I'll help you with string, we can move on integers later.

  6. #21
    getsuga121's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    39
    Reputation
    10
    Thanks
    39
    My Mood
    Sad
    lol i feel like i am in school messing with integers.

    Class BO2_MemoryClass
    Private GameProc As String = ""
    Private Function OpenGame() As IntPtr
    If System.Diagnostics.Process.GetProcessesByName(Game Proc).Length = 1 Then
    Return System.Diagnostics.Process.GetProcessesByName(Game Proc)(0).Handle
    End If
    Return New IntPtr(0)
    End Function
    Public Enum ProcessAccessFlags As UInteger
    All = &H1F0FFF
    Terminate = &H1
    CreateThread = &H2
    Operation = &H8
    Read = &H10
    Write = &H20
    DupHandle = &H40
    SetInformation = &H200
    QueryInformation = &H400
    Synchronize = &H100000
    End Enum
    <Runtime.InteropServices.DllImport("kernel32.dll") > _
    Private Shared Function OpenProcess(dwDesiredAccess As ProcessAccessFlags, <Runtime.InteropServices.MarshalAs(Runtime.Interop Services.UnmanagedType.Bool)> bInheritHandle As Boolean, dwProcessId As Integer) As IntPtr
    End Function
    <Runtime.InteropServices.DllImport("kernel32.dll") > _
    Private Shared Function CloseHandle(hObject As IntPtr) As Boolean
    End Function
    <Runtime.InteropServices.DllImport("kernel32.dll") > _
    Private Shared Function ReadProcessMemory(hProcess As IntPtr, lpBaseAddress As IntPtr, <Runtime.InteropServices.In, Runtime.InteropServices.Out> buffer As Byte(), size As UInt32, ByRef lpNumberOfBytesWritten As IntPtr) As Int32
    End Function
    <Runtime.InteropServices.DllImport("kernel32.dll") > _
    Private Shared Function WriteProcessMemory(hProcess As IntPtr, lpBaseAddress As IntPtr, <Runtime.InteropServices.In, Runtime.InteropServices.Out> buffer As Byte(), size As UInt32, ByRef lpNumberOfBytesWritten As IntPtr) As Int32
    End Function


    Public Function Process_Handle(ProcessName As String) As Boolean
    GameProc = ProcessName
    If System.Diagnostics.Process.GetProcessesByName(Proc essName).Length = 1 Then
    Return True
    End If
    Return False
    End Function
    #Region "Write Stuff"
    Public Sub WriteString(Address As Integer, Text As String, Optional Length As Integer = -1)
    If Length = -1 Then
    Length = Text.Length
    End If
    Dim Buffer As Byte() = New System.Text.ASCIIEncoding().GetBytes(Text)
    Dim Zero As IntPtr = IntPtr.Zero
    WriteProcessMemory(OpenGame(), New IntPtr(Address), Buffer, CUInt(Length), Zero)
    End Sub
    Public Sub WriteInt(Address As Integer, Value As Integer)
    Dim buffer As Byte() = BitConverter.GetBytes(Value)
    Dim R As IntPtr
    WriteProcessMemory(OpenGame(), New IntPtr(Address), buffer, CUInt(4), R)
    End Sub
    Public Sub WriteUInt(Address As UInteger, Value As UInteger)
    Dim buffer As Byte() = BitConverter.GetBytes(Value)
    Dim R As IntPtr
    WriteProcessMemory(OpenGame(), New IntPtr(Address), buffer, CUInt(4), R)
    End Sub
    Public Sub WriteFloat(Address As Integer, Value As Single)
    Dim buffer As Byte() = BitConverter.GetBytes(Value)
    Dim R As IntPtr
    WriteProcessMemory(OpenGame(), New IntPtr(Address), buffer, CUInt(4), R)
    End Sub
    Public Sub WriteBytes(Address As Integer, ByteArray As Byte())
    Dim buffer As Byte() = ByteArray
    Dim R As IntPtr
    WriteProcessMemory(OpenGame(), New IntPtr(Address), buffer, CUInt(buffer.Length), R)
    End Sub
    #End Region
    #Region "Read Stuff"
    Public Function ReadString(Address As Integer, Length As Integer) As String
    Dim buffer As Byte() = New Byte(Length - 1) {}
    Dim R As IntPtr
    ReadProcessMemory(OpenGame(), New IntPtr(Address), buffer, CUInt(buffer.Length), R)
    Return New System.Text.ASCIIEncoding().GetString(buffer, 0, Length)
    End Function
    Public Function ReadInt(Address As Integer) As Integer
    Dim buffer As Byte() = New Byte(3) {}
    Dim R As IntPtr
    ReadProcessMemory(OpenGame(), New IntPtr(Address), buffer, CUInt(4), R)
    Return BitConverter.ToInt32(buffer, 0)
    End Function
    Public Function ReadUInt(Address As UInteger) As UInteger
    Dim buffer As Byte() = New Byte(3) {}
    Dim R As IntPtr
    ReadProcessMemory(OpenGame(), New IntPtr(Address), buffer, CUInt(4), R)
    Return BitConverter.ToUInt32(buffer, 0)
    End Function
    Public Function ReadFloat(Address As UInteger) As Single
    Dim buffer As Byte() = New Byte(7) {}
    Dim R As IntPtr
    ReadProcessMemory(OpenGame(), New IntPtr(Address), buffer, CUInt(4), R)
    Return BitConverter.ToSingle(buffer, 0)
    End Function
    Public Function ReadBytes(Address As Integer, BytesLength As Integer) As Byte()
    Dim buffer As Byte() = New Byte(BytesLength - 1) {}
    Dim R As IntPtr
    ReadProcessMemory(OpenGame(), New IntPtr(Address), buffer, CUInt(buffer.Length), R)
    Return buffer
    End Function
    #End Region
    #Region "Pointers"
    Public Function BaseAddress(Module_Name As String) As Integer
    Try
    If System.Diagnostics.Process.GetProcessesByName(Game Proc).Length <> 0 Then
    For Each [Mod] As System.Diagnostics.ProcessModule In System.Diagnostics.Process.GetProcessesByName(Game Proc)(0).Modules
    If [Mod].ModuleName = Module_Name Then
    Return [Mod].BaseAddress.ToInt32()
    End If
    Next
    Return 0
    Else
    Return 0
    End If
    Catch
    Console.WriteLine("Base Address Error")
    Return 0
    End Try
    End Function
    Public Function Pointers([Module] As String, PointersX As Integer()) As Integer
    Dim Base As Integer = BaseAddress([Module]) + PointersX(0)
    Dim Runner As Integer = ReadInt(Base) + PointersX(1)
    Dim i As Integer = 2
    While i <> PointersX.Length - 2
    Runner = ReadInt(Runner) + PointersX(i)
    i += 1
    End While

    Return Runner
    End Function
    #End Region
    End Class

  7. #22
    Lovroman's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    9,430
    Reputation
    611
    Thanks
    9,710
    My Mood
    Cheerful
    Quote Originally Posted by getsuga121 View Post
    lol i feel like i am in school messing with integers.
    CODE
    Next time use code tags .
    Code:
    If BO2_MemoryClass.Process_Handle("t6mp") Then
    BO2_MemoryClass.WriteString(address,value) 
    End If
    I guess this works.

  8. #23
    getsuga121's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    39
    Reputation
    10
    Thanks
    39
    My Mood
    Sad
    Error 2 Reference to a non-shared member requires an object reference. C:\Users\Getsuga121\Documents\Visual Studio 2010\Projects\Login1\Login1\trainer.vb 95 12 Login1
    What now?

  9. #24
    Lovroman's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    9,430
    Reputation
    611
    Thanks
    9,710
    My Mood
    Cheerful
    Quote Originally Posted by getsuga121 View Post
    Error 2 Reference to a non-shared member requires an object reference. C:\Users\Getsuga121\Documents\Visual Studio 2010\Projects\Login1\Login1\trainer.vb 95 12 Login1
    What now?
    Sorry for late answer. I went to see what happened in this episode of my favorite TV show.
    Yup, I forgot, you have to make reference to memory class.
    You can do this:
    Code:
    Dim BO2 As BO2_MemoryClass
    [CODE]
    If BO2.Process_Handle("t6mp") Then
    BO2.WriteString(address,value)
    End If
    [CODE]

  10. #25
    getsuga121's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    39
    Reputation
    10
    Thanks
    39
    My Mood
    Sad
    Whats the tv show?
    and thank you it works now <3

  11. #26
    Lovroman's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    9,430
    Reputation
    611
    Thanks
    9,710
    My Mood
    Cheerful
    Quote Originally Posted by getsuga121 View Post
    Whats the tv show?
    and thank you it works now <3

    You can do same if you want Integer, just replace WriteString with WriteInteger .

  12. #27
    getsuga121's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    39
    Reputation
    10
    Thanks
    39
    My Mood
    Sad
    Edit:
    title: NullReferenceException was unhandled
    title 2:Object reference not set to an instance of an object.
    when i try to use the code

  13. #28
    Lovroman's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    9,430
    Reputation
    611
    Thanks
    9,710
    My Mood
    Cheerful
    Quote Originally Posted by getsuga121 View Post
    Edit:
    title: NullReferenceException was unhandled
    title 2:Object reference not set to an instance of an object.
    when i try to use the code

    Sorry. I tought the code works so I went to bed yesterday .
    Can you paste code here again ?
    Thanks!

  14. #29
    TonyMane123's Avatar
    Join Date
    Jul 2013
    Gender
    male
    Location
    ★ Chicago, USA ★
    Posts
    324
    Reputation
    22
    Thanks
    4,269
    My Mood
    Amused
    I did everything you said aswell, and its still not working, i even made a new project and only added jorndels class and still errors

Page 2 of 2 FirstFirst 12

Similar Threads

  1. How to make a Ip changer? in visual basics 2008
    By deathninjak0 in forum Programming Tutorial Requests
    Replies: 2
    Last Post: 11-25-2009, 06:00 PM
  2. Need help with visual basic PHISHING program
    By mariofan901 in forum Visual Basic Programming
    Replies: 14
    Last Post: 10-10-2009, 12:27 PM
  3. [Request]How to make a process list in visual basic 2008
    By trevor206 in forum Visual Basic Programming
    Replies: 2
    Last Post: 09-14-2009, 05:55 PM
  4. Fun with Visual Basics *VB for choops*
    By PandN in forum Visual Basic Programming
    Replies: 7
    Last Post: 07-17-2009, 01:23 PM
  5. [Help] Atom API with Visual Basic 6.0 or .NET
    By Bull3t in forum Visual Basic Programming
    Replies: 5
    Last Post: 07-23-2006, 10:21 AM