Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,539
    My Mood
    Angelic

    Red face VB.Net Memory Class (Writen by Jorndel)

    Well, so I re-wrote the Trainer Class. (Also re-named it.)

    What is new:
    It's way shorter thanks too: Dr. D (That informed me that I didn't need to use the OpenProcess() )

    New Functions:
    Process_Handle = Process to write/read too. (Returns an Boolean Value)
    -Write-
    WriteInteger = Writes an integer. (4 byte) Address = Offset to Write. Value = Value to Write.
    WriteString = Writes an string. Address = Offset to Write. Text= String to Write.
    WriteBytes = Writes an Byte Array. Address = Offset to Write. Bytes= Byte Array to Write.
    WriteNOP = Writes an Byte Array. 5 Bytes of 0x90. Address = Offset to Write.
    -Read-
    ReadInteger = Reads an integer. (4 Byte also able to change) Address = Offset to Read. Length = Bytes to write [OPTIMAL]
    ReadString = Reads an string. Address = Offset to Read from. Length = Length to read.
    ReadBytes = Reads an Byte Array. Address = Offset to Read from. Length = Length to read.
    -Extra-
    HotKey = Allow you to check if the key is down. (Need to be in a timer to work)
    Check_Value = Allow you to check the input in the TextBox / String. (If it's not a number, it returns 0. Else the written value)

    Image:

    Scans:
    Memory Class VB.Net.rar - Jotti's malware scan
    https://www.virustotal.com/file/c445...is/1337500752/
    Report - Antivirus online virus scan - viruschief.com
    <b>Downloadable Files</b> Downloadable Files

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  2. The Following 86 Users Say Thank You to Jorndel For This Useful Post:

    >HaXed< (05-01-2015),'Quarentine (09-11-2012),*MrHaCkEr* (05-29-2012),0xf00l (07-07-2013),8itian (08-16-2014),a1a (02-24-2013),abarcairvin (12-23-2013),AeRzD (10-29-2012),Afdul (4 Weeks Ago),agilcyber (11-04-2012),Animeci94 (2 Weeks Ago),arika2 (07-12-2013),armydude576 (08-09-2016),badman1343 (12-20-2014),barbariy1 (05-25-2012),Birdpoop (11-02-2012),buxkaizhe (12-03-2014),CRISSxKENNY (05-31-2013),DawgiiStylz (01-08-2013),DDTrickS (02-08-2013),deaddead1 (01-22-2014),donrevallo (12-10-2012),dtb2001 (05-19-2013),DTeCH (06-28-2013),Geometrical (10-11-2012),gmack101 (03-10-2014),goblineditz (02-16-2014),goxo (04-09-2013),Ilja_ (09-15-2015),jackisalegend (06-28-2014),jacklok98 (07-06-2012),JimmyRustle (10-02-2012),Joel88 (06-17-2016),johannlikebmx (06-08-2013),JokerKing9903 (03-11-2016),Keivo (03-26-2015),keyblade95 (08-18-2012),kimleng (06-07-2015),L00ker (05-27-2013),lefty346 (02-18-2013),LillilateX (09-08-2014),Lovroman (05-31-2013),maffin1111 (10-19-2014),MairockLukas (05-20-2013),marcos450 (12-27-2013),MarioFreitag17 (01-05-2013),mayssen (11-10-2013),MR.SUCHTI (05-17-2016),MW3HackzZ4PC (02-24-2013),nubstuff51 (12-07-2012),Osman Batur (03-23-2013),Phusic (05-20-2012),RamsesX (09-22-2015),Randomsheit (01-16-2013),Rasus (01-12-2014),Rexseven01 (03-10-2014),robbancss (01-09-2016),shatteredglassedge (10-28-2012),Shejdy (10-10-2014),simpleguy01_evo (08-17-2013),skeletonmage (11-13-2012),Skinksteek (11-09-2012),sn0wyyy (05-14-2015),Snowy White (10-02-2015),stapled (06-21-2012),Suchtie310 (11-15-2012),SuperMarlon007 (12-07-2015),szder (12-06-2012),TheStacktrace (04-02-2015),thijsduijker (05-31-2013),ToKKan (08-04-2012),tomlarose (01-18-2015),true1495 (09-19-2012),TrueBlue (03-17-2014),TryOne (01-31-2014),Turtleee1337 (11-21-2014),Ucozol (07-16-2014),Vamphilim (07-23-2015),Vishay (10-06-2014),xERZAv (04-14-2013),XOIIT (10-27-2012),xTheSponge (10-16-2014),yoraeangga (02-05-2015),ZorroY (04-20-2013),[THE]Creative (12-29-2014),_SlimShady_ (06-28-2015)

  3. #2
    Phusic's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Posts
    40
    Reputation
    10
    Thanks
    5
    so should I use this instead of
    Code:
    <Flags()> _
        Public Enum ProcessAccessType
            PROCESS_TERMINATE = (&H1)
            PROCESS_CREATE_THREAD = (&H2)
            PROCESS_SET_SESSIONID = (&H4)
            PROCESS_VM_OPERATION = (&H8)
            PROCESS_VM_READ = (&H10)
            PROCESS_VM_WRITE = (&H20)
            PROCESS_DUP_HANDLE = (&H40)
            PROCESS_CREATE_PROCESS = (&H80)
            PROCESS_SET_QUOTA = (&H100)
            PROCESS_SET_INFORMATION = (&H200)
            PROCESS_QUERY_INFORMATION = (&H400)
        End Enum
        <DllImport("kernel32.dll")> _
        Public Shared Function OpenProcess(ByVal dwDesiredAccess As UInt32, ByVal bInheritHandle As Int32, ByVal dwProcessId As UInt32) As IntPtr
        End Function
        <DllImport("kernel32.dll")> _
        Public Shared Function CloseHandle(ByVal hObject As IntPtr) As Int32
        End Function
        <DllImport("kernel32.dll")> _
        Public Shared Function ReadProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, <[In](), Out()> ByVal buffer As Byte(), ByVal size As UInt32, ByRef lpNumberOfBytesRead As IntPtr) As Int32
        End Function
        <DllImport("kernel32.dll")> _
        Public Shared Function WriteProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, <[In](), Out()> ByVal buffer As Byte(), ByVal size As UInt32, ByRef lpNumberOfBytesWritten As IntPtr) As Int32
        End Function
     
     
        Public Function Hack(ByVal Application As String) As Boolean
            Dim pArray As Process() = Process.GetProcessesByName(Application)
            If pArray.Length = 0 Then
                Return True
            End If
            ReadProcess = pArray(0)
            Open()
            Return False
        End Function
     
        Public Sub SetInt(ByVal Address As Integer, ByVal Value As Integer)
            Dim byteswritten As Integer
            Write(Address, BitConverter.GetBytes(Value), byteswritten)
        End Sub
     
     
        Public Sub SetByte(ByVal Address As Integer, ByVal Value As Byte())
            Dim byteswritten As Integer
            Write(Address, Value, byteswritten)
        End Sub
     
     
        Private Property ReadProcess() As Process
            Get
                Return m_ReadProcess
            End Get
            Set(ByVal value As Process)
                m_ReadProcess = value
            End Set
        End Property
        Private m_ReadProcess As Process = Nothing
        Private m_hProcess As IntPtr = IntPtr.Zero
        Private Sub Open()
            Dim access As ProcessAccessType
            access = ProcessAccessType.PROCESS_VM_READ Or ProcessAccessType.PROCESS_VM_WRITE Or ProcessAccessType.PROCESS_VM_OPERATION
            m_hProcess = OpenProcess(CUInt(access), 1, CUInt(m_ReadProcess.Id))
        End Sub
        Private Sub CloseHandle()
            Dim iRetValue As Integer
            iRetValue = CloseHandle(m_hProcess)
            If iRetValue = 0 Then
                Throw New Exception("CloseHandle failed")
            End If
        End Sub
        Private Sub Write(ByVal MemoryAddress As IntPtr, ByVal bytesToWrite As Byte(), ByRef bytesWritten As Integer)
            Dim ptrBytesWritten As IntPtr
            WriteProcessMemory(m_hProcess, MemoryAddress, bytesToWrite, CUInt(bytesToWrite.Length), ptrBytesWritten)
            bytesWritten = ptrBytesWritten.ToInt32()
        End Sub

  4. #3
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,539
    My Mood
    Angelic
    Quote Originally Posted by Phusic View Post
    so should I use this instead of
    Code:
    <Flags()> _
        Public Enum ProcessAccessType
            PROCESS_TERMINATE = (&H1)
            PROCESS_CREATE_THREAD = (&H2)
            PROCESS_SET_SESSIONID = (&H4)
            PROCESS_VM_OPERATION = (&H8)
            PROCESS_VM_READ = (&H10)
            PROCESS_VM_WRITE = (&H20)
            PROCESS_DUP_HANDLE = (&H40)
            PROCESS_CREATE_PROCESS = (&H80)
            PROCESS_SET_QUOTA = (&H100)
            PROCESS_SET_INFORMATION = (&H200)
            PROCESS_QUERY_INFORMATION = (&H400)
        End Enum
        <DllImport("kernel32.dll")> _
        Public Shared Function OpenProcess(ByVal dwDesiredAccess As UInt32, ByVal bInheritHandle As Int32, ByVal dwProcessId As UInt32) As IntPtr
        End Function
        <DllImport("kernel32.dll")> _
        Public Shared Function CloseHandle(ByVal hObject As IntPtr) As Int32
        End Function
        <DllImport("kernel32.dll")> _
        Public Shared Function ReadProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, <[In](), Out()> ByVal buffer As Byte(), ByVal size As UInt32, ByRef lpNumberOfBytesRead As IntPtr) As Int32
        End Function
        <DllImport("kernel32.dll")> _
        Public Shared Function WriteProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, <[In](), Out()> ByVal buffer As Byte(), ByVal size As UInt32, ByRef lpNumberOfBytesWritten As IntPtr) As Int32
        End Function
     
     
        Public Function Hack(ByVal Application As String) As Boolean
            Dim pArray As Process() = Process.GetProcessesByName(Application)
            If pArray.Length = 0 Then
                Return True
            End If
            ReadProcess = pArray(0)
            Open()
            Return False
        End Function
     
        Public Sub SetInt(ByVal Address As Integer, ByVal Value As Integer)
            Dim byteswritten As Integer
            Write(Address, BitConverter.GetBytes(Value), byteswritten)
        End Sub
     
     
        Public Sub SetByte(ByVal Address As Integer, ByVal Value As Byte())
            Dim byteswritten As Integer
            Write(Address, Value, byteswritten)
        End Sub
     
     
        Private Property ReadProcess() As Process
            Get
                Return m_ReadProcess
            End Get
            Set(ByVal value As Process)
                m_ReadProcess = value
            End Set
        End Property
        Private m_ReadProcess As Process = Nothing
        Private m_hProcess As IntPtr = IntPtr.Zero
        Private Sub Open()
            Dim access As ProcessAccessType
            access = ProcessAccessType.PROCESS_VM_READ Or ProcessAccessType.PROCESS_VM_WRITE Or ProcessAccessType.PROCESS_VM_OPERATION
            m_hProcess = OpenProcess(CUInt(access), 1, CUInt(m_ReadProcess.Id))
        End Sub
        Private Sub CloseHandle()
            Dim iRetValue As Integer
            iRetValue = CloseHandle(m_hProcess)
            If iRetValue = 0 Then
                Throw New Exception("CloseHandle failed")
            End If
        End Sub
        Private Sub Write(ByVal MemoryAddress As IntPtr, ByVal bytesToWrite As Byte(), ByRef bytesWritten As Integer)
            Dim ptrBytesWritten As IntPtr
            WriteProcessMemory(m_hProcess, MemoryAddress, bytesToWrite, CUInt(bytesToWrite.Length), ptrBytesWritten)
            bytesWritten = ptrBytesWritten.ToInt32()
        End Sub
    Up to you
    This is just smaller and easier to work with.
    Also more options.

    But use what you like the best :P

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  5. The Following User Says Thank You to Jorndel For This Useful Post:

    Vamphilim (07-23-2015)

  6. #4
    Phusic's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Posts
    40
    Reputation
    10
    Thanks
    5
    Quote Originally Posted by Jorndel View Post
    Up to you
    This is just smaller and easier to work with.
    Also more options.

    But use what you like the best :P
    You say more options, what may these options be?

  7. #5
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,539
    My Mood
    Angelic
    Quote Originally Posted by Phusic View Post
    You say more options, what may these options be?
    Like read the thread sometimes answers the question:

    And see what you have...

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  8. #6
    Phusic's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Posts
    40
    Reputation
    10
    Thanks
    5
    Quote Originally Posted by Jorndel View Post
    Like read the thread sometimes answers the question:

    And see what you have...
    oh god now I feel blind and stupid, sorry about that

  9. #7
    Nordiii's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    150
    Reputation
    61
    Thanks
    701
    My Mood
    Angelic
    Quote Originally Posted by Jorndel View Post
    Well, so I re-wrote the Trainer Class. (Also re-named it.)

    What is new:
    It's way shorter thanks too: Dr. D (That informed me that I didn't need to use the OpenProcess() )

    New Functions:
    Process_Handle = Process to write/read too. (Returns an Boolean Value)
    -Write-
    WriteInteger = Writes an integer. (4 byte) Address = Offset to Write. Value = Value to Write.
    WriteString = Writes an string. Address = Offset to Write. Text= String to Write.
    WriteBytes = Writes an Byte Array. Address = Offset to Write. Bytes= Byte Array to Write.
    WriteNOP = Writes an Byte Array. 5 Bytes of 0x90. Address = Offset to Write.
    -Read-
    ReadInteger = Reads an integer. (4 Byte also able to change) Address = Offset to Read. Length = Bytes to write [OPTIMAL]
    ReadString = Reads an string. Address = Offset to Read from. Length = Length to read.
    ReadBytes = Reads an Byte Array. Address = Offset to Read from. Length = Length to read.
    -Extra-
    HotKey = Allow you to check if the key is down. (Need to be in a timer to work)
    Check_Value = Allow you to check the input in the TextBox / String. (If it's not a number, it returns 0. Else the written value)

    Image:

    Scans:
    Memory Class VB.Net.rar - Jotti's malware scan
    https://www.virustotal.com/file/c445...is/1337500752/
    Report - Antivirus online virus scan - viruschief.com

    You could add read and write Floats and get BaseAddress


    For every one who may need this and dont know how to write it (may it isn't the best solution I only work with java usually)

    Write:
    Code:
        Public Sub WriteFloat(Address As Integer, Float As Single)
            Dim Buffer As Byte() = BitConverter.GetBytes(Float)
            Dim Zero As IntPtr = IntPtr.Zero
            WriteProcessMemory(pHandel, New IntPtr(Address), Buffer, 4, Zero)
        End Sub
    Read:
    Code:
        Public Function ReadFloat(Address As Integer, Optional Length As Integer = 4) As Double
            Return BitConverter.ToSingle(Read(Address, Length), 0)
        End Function
    And may add get BaseAddress to Process_Handle

    Code:
        Private pHandel As IntPtr
        Private ProcessModule As ProcessModule
        Public BaseAddress As Integer
        Public Function Process_Handle(ProcessName As String) As Boolean
            Try
                ProcList = Process.GetProcessesByName(ProcessName)
                If ProcList.Length = 0 Then
                    Return False
                Else
                    pHandel = ProcList(0).Handle
                    ProcessModule = ProcList(0).MainModule
                    BaseAddress = ProcessModule.BaseAddress
                    Return True
                End If
            Catch ex As Exception
                Console.WriteLine("Process_Handle - " + ex.Message)
                Return False
            End Try
        End Function

  10. #8
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,539
    My Mood
    Angelic
    Quote Originally Posted by Nordiii View Post
    You could add read and write Floats and get BaseAddress
    Well, nice of you to add, but already released update with this in it

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  11. #9
    Nordiii's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    150
    Reputation
    61
    Thanks
    701
    My Mood
    Angelic
    Quote Originally Posted by Jorndel View Post


    Well, nice of you to add, but already released update with this in it
    Oh sorry I doesn't saw it I used this Class ^^ have nothing said :3

  12. #10
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,539
    My Mood
    Angelic
    Quote Originally Posted by Nordiii View Post
    Oh sorry I doesn't saw it I used this Class ^^ have nothing said :3
    No problems

    Glad to see someone use and appreciate it, and add some updates to it

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  13. The Following User Says Thank You to Jorndel For This Useful Post:

    Nordiii (01-07-2013)

  14. #11
    fredemm's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Posts
    5
    Reputation
    10
    Thanks
    0
    Don't really understand how to use this
    Could someone give me basic examples of selecting which process to read/Write from and how to Read/Write a certain memory adress

  15. #12
    Kenshin13's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    Cloud 9
    Posts
    3,473
    Reputation
    564
    Thanks
    5,876
    My Mood
    Psychedelic
    Quote Originally Posted by fredemm View Post
    Don't really understand how to use this
    Could someone give me basic examples of selecting which process to read/Write from and how to Read/Write a certain memory adress
    Look at post #7 .....
    Last edited by Lovroman; 05-29-2014 at 09:21 AM.

  16. #13
    Mayion's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Location
    Bed
    Posts
    12,565
    Reputation
    2810
    Thanks
    7,442
    My Mood
    Twisted
    Why are you telling at him idiot ??!?, someone ask for help you should help him not say this, stupid...


     


    Editor - N/A
    Donator - 30 August 2013
    Battlefield Minion - 26 October 2013
    Blackshot Minion - 14 January 2014/16 September 2014
    Minecraft Minion - 7 February 2014/16 September 2014
    WarRock Minion - 23 February 2014
    League of Legends Minion - 21 March 2014

    Minion+ - 15 May 2014
    Other Semi-Popular First Person Shooter Minion - 8 August 2014
    CrossFire Minion - 23 October 2014
    Programming Section Minion - 13 November 2014
    Marketplace Minion - 7 December 2014

    Official Middleman - 7 December 2014 - 27 June 2015
    Moderator - 29 December 2014
    Project Blackout Minion - 10 January 2015
    News Force Interviewer - January 2015
    Steam Games Minion - 21 March 2015
    Dragon Nest Minion - 31 March 2015
    Publicist - April 2015 - 21 September 2015
    Global Moderator - 25 August 2015
    Super User - 13 August 2016

    Here ends the legend of me; may I rest in peace.



  17. #14
    Kenshin13's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    Cloud 9
    Posts
    3,473
    Reputation
    564
    Thanks
    5,876
    My Mood
    Psychedelic
    Quote Originally Posted by Mayion View Post
    Why are you telling at him idiot ??!?, someone ask for help you should help him not say this, stupid...
    Yea but ask for help after you at least tried to figure out the problem.... >.> Read 1% of a thread, don't understand.

    Usual Choice: Read other 99%. If you can't figure it out after, ask for help.
    His Choice: Read 1% and ask for help.

    You tend to get pissed at that...

  18. The Following User Says Thank You to Kenshin13 For This Useful Post:

    [MPGH]Eithan1231 (2 Days Ago)

  19. #15
    kooperpc's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Location
    Somewhere
    Posts
    37
    Reputation
    16
    Thanks
    308
    How can I modify the 8Bytes values?

Page 1 of 2 12 LastLast

Similar Threads

  1. C# Memory Class (Writen by Jorndel)
    By Jorndel in forum Call of Duty Modern Warfare 3 Coding, Programming & Source Code
    Replies: 10
    Last Post: 03-22-2015, 06:43 AM
  2. [Help] Memory Hack base Using Classes Help I Don't Get It
    By kmanev073 in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 10
    Last Post: 01-05-2012, 05:21 AM
  3. [Help]Reading Stacks from memory using VB.net
    By euverve in forum Visual Basic Programming
    Replies: 2
    Last Post: 04-19-2011, 11:10 AM
  4. [VB.Net] Read Memory
    By jabbathehutt in forum Visual Basic Programming
    Replies: 10
    Last Post: 11-21-2010, 10:55 AM
  5. Easy Class Editor for alteriw.net
    By sisadebela in forum Call of Duty Modern Warfare 2 Private Servers
    Replies: 7
    Last Post: 05-30-2010, 12:08 PM