Results 1 to 8 of 8
  1. #1
    MikeRohsoft's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    Los Santos
    Posts
    803
    Reputation
    593
    Thanks
    24,843

    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 2 Users Say Thank You to MikeRohsoft For This Useful Post:

    defaulto (08-01-2019),MurderWill (08-04-2019)

  3. #2
    Biesi's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    4,947
    Reputation
    353
    Thanks
    8,739
    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
    803
    Reputation
    593
    Thanks
    24,843
    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,947
    Reputation
    353
    Thanks
    8,739
    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
    43
    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
    259
    Reputation
    139
    Thanks
    154
    My Mood
    Angelic
    You actually did updated it once in a while? Didn't saw that yet until now. Great job, Mike!



     




  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

Similar Threads

  1. [Source Code] C# Memory Class x64 (x86)
    By MikeRohsoft in forum C# Programming
    Replies: 5
    Last Post: 01-28-2019, 03:09 PM
  2. [Source Code] C# Memory class x86
    By Silent in forum C# Programming
    Replies: 29
    Last Post: 10-17-2018, 01:26 AM
  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