Results 1 to 9 of 9
  1. #1
    MikeRohsoft's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    Los Santos
    Posts
    797
    Reputation
    593
    Thanks
    26,314

    C# Memory Class x64 / x86

    My Generic C# Memory Class, just some more Advanced.
    It supports now PatternScan and offset reading.
    It's also very simple to use, i let suffer GTA a little bit more for you:
    Code:
    using System;
    
    namespace ConsoleApp1
    {
        class Program
        {
            static void Main(string[] args)
            {
                const int WORLD_OFFSET = 8;
                const int LIFE_OFFSET = 0x280;
                const int ARMOR_OFFSET = 0x14B8;
                const int PLAYER_INFO_OFFSET = 0x10B8;
                const int WANTED_LEVEL_OFFSET = 0x0780 + 0x0098;
    
                Memory GTA = new Memory("GTA5");
                Console.WriteLine("Game process Id: " + GTA.GetProcessID().ToString("x8").ToUpper());
    
                // UInt64 WorldFlirtPointer = GTA.PointerScan("\x48\x8B\x05\x90\x90\x90\x90\x45\x90\x90\x90\x90\x48\x8B\x48\x08\x48\x85\xC9\x74\x07", "xxx????x????xxxxxxxxx");
                UInt64 WorldFlirtPointer = GTA.PointerScan("48 8B 05 ? ? ? ? 45 ? ? ? ? 48 8B 48 08 48 85 C9 74 07");
                Console.WriteLine("World FLIRT Address: " + WorldFlirtPointer.ToString("x8"));
    
                UInt64 World = GTA.ReadRelativeAddress(WorldFlirtPointer);
                Console.WriteLine("World Address: " + World.ToString("x8"));
    
                UInt64 Player = GTA.Read<UInt64>(World, new int[] { WORLD_OFFSET });
                Console.WriteLine("Player Address: " + Player.ToString("x8"));
    
                Console.WriteLine("Health: " + GTA.Read<float>(Player + LIFE_OFFSET).ToString());
                Console.WriteLine("Armor: " + GTA.Read<float>(Player + ARMOR_OFFSET).ToString());
                Console.WriteLine("Wanted Level: " + GTA.Read<int>(Player + PLAYER_INFO_OFFSET, new int[] { WANTED_LEVEL_OFFSET }).ToString());
                
                GTA.Write<float>(Player + LIFE_OFFSET, 150.0f);
                GTA.Write<float>(Player + ARMOR_OFFSET, 50.0f);
                GTA.Write<int>(Player + PLAYER_INFO_OFFSET, 5, new int[] { WANTED_LEVEL_OFFSET });
    
                Console.WriteLine("Wanted Level: " + GTA.Read<int>(Player + PLAYER_INFO_OFFSET, new int[] { WANTED_LEVEL_OFFSET }).ToString());
                Console.WriteLine("Health: " + GTA.Read<float>(Player + LIFE_OFFSET).ToString());
                Console.WriteLine("Armor: " + GTA.Read<float>(Player + ARMOR_OFFSET).ToString());
                System.Threading.Thread.Sleep(100000);
            }   
        }
    }
    VirusTotal
    Jotti Malware Scan
    MetaDefender
    <b>Downloadable Files</b> Downloadable Files

  2. The Following 11 Users Say Thank You to MikeRohsoft For This Useful Post:

    4773n0x (03-28-2020),a3147073337 (04-27-2021),dealio07 (05-28-2021),defaulto (08-01-2019),MurderWill (08-04-2019),n0tme (06-24-2020),oGPepsi (01-06-2020),pentroxd (11-13-2022),sameerliaqat00 (09-04-2022),takechi2519 (07-30-2020),uselessro (10-27-2019)

  3. #2
    Biesi's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    4,993
    Reputation
    374
    Thanks
    8,808
    My Mood
    Twisted
    Are you a Java developer by any chance? C# has properties, no need for get/set methods.. Oh and you should also implement IDisposable instead of just a finalizer for the class

  4. #3
    MikeRohsoft's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    Los Santos
    Posts
    797
    Reputation
    593
    Thanks
    26,314
    I'm C++ Developer ^^
    Java is everything, but not a programming language.
    More the Cancer of Computers

  5. #4
    Biesi's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    4,993
    Reputation
    374
    Thanks
    8,808
    My Mood
    Twisted
    Quote Originally Posted by MikeRohsoft View Post
    but not a programming language.
    More the Cancer of Computers
    Well, that's one way to put it.. XD

  6. The Following User Says Thank You to Biesi For This Useful Post:

    MikeRohsoft (08-01-2019)

  7. #5
    b3rk4n96's Avatar
    Join Date
    Aug 2017
    Gender
    male
    Location
    Istanbul
    Posts
    41
    Reputation
    25
    Thanks
    4
    Quote Originally Posted by Biesi View Post


    Well, that's one way to put it.. XD
    hahaha, You'r funny

  8. #6
    defaulto's Avatar
    Join Date
    Aug 2017
    Gender
    male
    Posts
    461
    Reputation
    427
    Thanks
    347
    My Mood
    Angelic
    You actually did updated it once in a while? Didn't saw that yet until now. Great job, Mike!

    #LOGS
    12-02-2020 ⌨ [MPGH]defaulto got gifted the Premium Membership from [MPGH]Azuki - sponsored by [MPGH]Flengo.
    27-11-2019 ⌨ [MPGH]defaulto captured the GFX Team Base together with [MPGH]Howl & [MPGH]Poonce.
    08-14-2017 ⌨ defaulto joined the game.

  9. The Following User Says Thank You to defaulto For This Useful Post:

    MikeRohsoft (08-01-2019)

  10. #7
    Sem1083's Avatar
    Join Date
    Jan 2019
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    My Mood
    Flirty
    Quote Originally Posted by MikeRohsoft View Post
    My Generic C# Memory Class, just some more Advanced.
    It supports now PatternScan and offset reading.
    It's also very simple to use, i let suffer GTA a little bit more for you:
    Code:
    using System;
    
    namespace ConsoleApp1
    {
        class Program
        {
            static void Main(string[] args)
            {
                const int WORLD_OFFSET = 8;
                const int LIFE_OFFSET = 0x280;
                const int ARMOR_OFFSET = 0x14B8;
                const int PLAYER_INFO_OFFSET = 0x10B8;
                const int WANTED_LEVEL_OFFSET = 0x0780 + 0x0098;
    
                Memory GTA = new Memory("GTA5");
                Console.WriteLine("Game process Id: " + GTA.GetProcessID().ToString("x8").ToUpper());
    
                // UInt64 WorldFlirtPointer = GTA.PointerScan("\x48\x8B\x05\x90\x90\x90\x90\x45\x90\x90\x90\x90\x48\x8B\x48\x08\x48\x85\xC9\x74\x07", "xxx????x????xxxxxxxxx");
                UInt64 WorldFlirtPointer = GTA.PointerScan("48 8B 05 ? ? ? ? 45 ? ? ? ? 48 8B 48 08 48 85 C9 74 07");
                Console.WriteLine("World FLIRT Address: " + WorldFlirtPointer.ToString("x8"));
    
                UInt64 World = GTA.ReadRelativeAddress(WorldFlirtPointer);
                Console.WriteLine("World Address: " + World.ToString("x8"));
    
                UInt64 Player = GTA.Read<UInt64>(World, new int[] { WORLD_OFFSET });
                Console.WriteLine("Player Address: " + Player.ToString("x8"));
    
                Console.WriteLine("Health: " + GTA.Read<float>(Player + LIFE_OFFSET).ToString());
                Console.WriteLine("Armor: " + GTA.Read<float>(Player + ARMOR_OFFSET).ToString());
                Console.WriteLine("Wanted Level: " + GTA.Read<int>(Player + PLAYER_INFO_OFFSET, new int[] { WANTED_LEVEL_OFFSET }).ToString());
                
                GTA.Write<float>(Player + LIFE_OFFSET, 150.0f);
                GTA.Write<float>(Player + ARMOR_OFFSET, 50.0f);
                GTA.Write<int>(Player + PLAYER_INFO_OFFSET, 5, new int[] { WANTED_LEVEL_OFFSET });
    
                Console.WriteLine("Wanted Level: " + GTA.Read<int>(Player + PLAYER_INFO_OFFSET, new int[] { WANTED_LEVEL_OFFSET }).ToString());
                Console.WriteLine("Health: " + GTA.Read<float>(Player + LIFE_OFFSET).ToString());
                Console.WriteLine("Armor: " + GTA.Read<float>(Player + ARMOR_OFFSET).ToString());
                System.Threading.Thread.Sleep(100000);
            }   
        }
    }
    VirusTotal
    Jotti Malware Scan
    MetaDefender
    How would you trigger script events? Ie for kicks?

  11. #8
    herocode's Avatar
    Join Date
    Aug 2019
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by MikeRohsoft View Post
    My Generic C# Memory Class, just some more Advanced.
    It supports now PatternScan and offset reading.
    It's also very simple to use, i let suffer GTA a little bit more for you:
    Code:
    using System;
    
    namespace ConsoleApp1
    {
        class Program
        {
            static void Main(string[] args)
            {
                const int WORLD_OFFSET = 8;
                const int LIFE_OFFSET = 0x280;
                const int ARMOR_OFFSET = 0x14B8;
                const int PLAYER_INFO_OFFSET = 0x10B8;
                const int WANTED_LEVEL_OFFSET = 0x0780 + 0x0098;
    
                Memory GTA = new Memory("GTA5");
                Console.WriteLine("Game process Id: " + GTA.GetProcessID().ToString("x8").ToUpper());
    
                // UInt64 WorldFlirtPointer = GTA.PointerScan("\x48\x8B\x05\x90\x90\x90\x90\x45\x90\x90\x90\x90\x48\x8B\x48\x08\x48\x85\xC9\x74\x07", "xxx????x????xxxxxxxxx");
                UInt64 WorldFlirtPointer = GTA.PointerScan("48 8B 05 ? ? ? ? 45 ? ? ? ? 48 8B 48 08 48 85 C9 74 07");
                Console.WriteLine("World FLIRT Address: " + WorldFlirtPointer.ToString("x8"));
    
                UInt64 World = GTA.ReadRelativeAddress(WorldFlirtPointer);
                Console.WriteLine("World Address: " + World.ToString("x8"));
    
                UInt64 Player = GTA.Read<UInt64>(World, new int[] { WORLD_OFFSET });
                Console.WriteLine("Player Address: " + Player.ToString("x8"));
    
                Console.WriteLine("Health: " + GTA.Read<float>(Player + LIFE_OFFSET).ToString());
                Console.WriteLine("Armor: " + GTA.Read<float>(Player + ARMOR_OFFSET).ToString());
                Console.WriteLine("Wanted Level: " + GTA.Read<int>(Player + PLAYER_INFO_OFFSET, new int[] { WANTED_LEVEL_OFFSET }).ToString());
                
                GTA.Write<float>(Player + LIFE_OFFSET, 150.0f);
                GTA.Write<float>(Player + ARMOR_OFFSET, 50.0f);
                GTA.Write<int>(Player + PLAYER_INFO_OFFSET, 5, new int[] { WANTED_LEVEL_OFFSET });
    
                Console.WriteLine("Wanted Level: " + GTA.Read<int>(Player + PLAYER_INFO_OFFSET, new int[] { WANTED_LEVEL_OFFSET }).ToString());
                Console.WriteLine("Health: " + GTA.Read<float>(Player + LIFE_OFFSET).ToString());
                Console.WriteLine("Armor: " + GTA.Read<float>(Player + ARMOR_OFFSET).ToString());
                System.Threading.Thread.Sleep(100000);
            }   
        }
    }
    VirusTotal
    Jotti Malware Scan
    MetaDefender
    error
    Code:
    Error	1	The name 'ptrScan' does not exist in the current context

  12. #9
    stage4000's Avatar
    Join Date
    Sep 2017
    Gender
    male
    Location
    Nowhere & Everywhere
    Posts
    47
    Reputation
    10
    Thanks
    95
    My Mood
    Busy
    thank you so much man

Similar Threads

  1. [Source Code] C# Memory class x86
    By Silent in forum C# Programming
    Replies: 30
    Last Post: 10-13-2019, 10:47 AM
  2. [Source Code] C# Memory Class x64 (x86)
    By MikeRohsoft in forum C# Programming
    Replies: 5
    Last Post: 01-28-2019, 03:09 PM
  3. [Source Code] VB Memory Class x86
    By Silent in forum Visual Basic Programming
    Replies: 7
    Last Post: 02-25-2017, 10:06 AM
  4. [Release] Useful/Versatile Memory Class x86/x64
    By Coridex73 in forum C# Programming
    Replies: 0
    Last Post: 02-12-2017, 10:40 PM
  5. Replies: 16
    Last Post: 08-10-2010, 04:29 PM