Thumbs upSolvedC# Memory Editing - Pointers

Posts 1–11 of 11 · Page 1 of 1
C# Memory Editing - Pointers
As above. Having problems with doing that, founding pointer's adress and changing it. I found this : http://www.mpgh.net/forum/31-c-c-pro...ml#post5903316 , but it uses DLL and I don't want that. Any advice will be very appreciated. I'm new to this stuff, so please, don't blame me. Thanks in advance.
1) the dll is for OFFLINE games (read the post)

2) search better before asking questions... look at jorndel's namefaker class, this is open source and it can edit pointers

(thanks if i helped xDDDDDDDD )
1) the dll is for OFFLINE games (read the post)
And what's the difference between OFFLINE and ONLINE Memory Editing? As far as I know there, isn't.

look at jorndel's namefaker class
Well, that's a good idea. Didn't know that his namefaker is open source. I'll take a look at it.
Quote Originally Posted by jakel007 View Post
And what's the difference between OFFLINE and ONLINE Memory Editing? As far as I know there, isn't.
None.. dunno why he said that...
Quote Originally Posted by jakel007 View Post
And what's the difference between OFFLINE and ONLINE Memory Editing? As far as I know there, isn't.
Quote Originally Posted by MarkHC View Post
None.. dunno why he said that...
well i dunno either actually, but in the thread jakel007 linked to, there's writen it's for offline games
Use Jourdnel's C# memory editor for MW3, Worked for me
Quote Originally Posted by dcrew10 View Post
Use Jourdnel's C# memory editor for MW3, Worked for me
You mean finding pointer's address and then editing memory? Could you tell me how to do it? Thanks.

And by the way, it's really hard for me to find what exacly would be useful for me from the Dragon's tool source code, looks like he uses strings, don't know if it will work with normal values.
Quote Originally Posted by jakel007 View Post
You mean finding pointer's address and then editing memory? Could you tell me how to do it? Thanks.
Have you got Skype or Steam? I can give you a helping hand, after all I am almost ready to release my new MW3 hack out soon

Skype: dcrew2011
Steam: Steam Community :: ID :: ./-Cw-\. Dcrew
Please, could someboady say how to use pointers with for example Jorndels C# Class? Thanks again.
Quote Originally Posted by jakel007 View Post
Please, could someboady say how to use pointers with for example Jorndels C# Class? Thanks again.
I will release my Newest Memory Class tomorrow.
But the current and mostly like what I will release tomorrow to help you a little:
Code:
public class Memory
    {
        string ProcName;
        public Memory(string ProcessName)
        {
            ProcName = ProcessName.Replace(".exe", "");
        }

        #region DLL Imports
        [DllImport("kernel32.dll")]
        private static extern IntPtr OpenProcess(UInt32 dwDesiredAccess, bool bInheritHandle, int dwProcessId);
        [DllImport("kernel32.dll")]
        private static extern Int32 ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [In, Out] byte[] buffer, UInt32 size, out IntPtr lpNumberOfBytesRead);
        [DllImport("kernel32.dll")]
        private static extern Int32 WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [In, Out] byte[] buffer, UInt32 size, out IntPtr lpNumberOfBytesWritten);
        #endregion
        #region Write & Read Main
        private byte[] Read(int Add, int Length)
        {
            byte[] Buffer = new byte[Length];
            IntPtr Zero = IntPtr.Zero;
            ReadProcessMemory(Open_Memory(), (IntPtr)Add, Buffer, (UInt32)Buffer.Length, out Zero);
            return Buffer;
        }
        private byte[] Write(int Address, byte[] Value, int Length = -1)
        {
            if (Length == -1)
                Length = Value.Length;

            byte[] Buffer = new byte[Length];
            IntPtr Zero = IntPtr.Zero;
            Convert.ToByte(10);
            WriteProcessMemory(Open_Memory(), (IntPtr)Address, Buffer, (UInt32)Length, out Zero);
            return Buffer;
        }
        private IntPtr Open_Memory()
        {
            if (Process.GetProcessesByName(ProcName).Length != 0)
            {
                return OpenProcess(0x1F0FFF, true, Process.GetProcessesByName(ProcName)[0].Id);
            }
            else return (IntPtr)0x0;
        }
        #endregion

        #region Write Stuff
        public void WriteInt(int Address, int Value)
        {
            byte[] buffer = BitConverter.GetBytes(Value);
            IntPtr R;
            WriteProcessMemory(Open_Memory(), (IntPtr)Address, buffer, 4, out R);
        }
        #endregion
        #region Read Stuff
        public uint ReadUInt(uint Address)
        {
            byte[] buffer = new byte[4];
            IntPtr R;
            ReadProcessMemory(Open_Memory(), (IntPtr)Address, buffer, 4, out R);
            return BitConverter.ToUInt32(buffer, 0);
        }
        #endregion
        #region Pointers
        private uint BaseAddressU(string Module_Name)
        {
            try
            {
                if (Process.GetProcessesByName(ProcName).Length != 0)
                {
                    foreach (ProcessModule Mod in Process.GetProcessesByName(ProcName)[0].Modules)
                    {
                        if (Mod.ModuleName == Module_Name)
                            return (uint)Mod.BaseAddress.ToInt32();
                    }
                    return 0;
                }
                else return 0;
            }
            catch { Console.WriteLine("Base Address Error"); return 0; }
        }
        public uint PointersU(string Module, uint[] Pointers)
        {
            uint Base = BaseAddressU(Module) + Pointers[0];
            uint Runner = ReadUInt(Base) + Pointers[1];
            for (int i = 2; i != Pointers.Length - 2; i++)
                Runner = ReadUInt(Runner) + Pointers[i];

            return Runner;
        }
        #endregion
    }
If you don't know how to use it, wait until tomorrow.

The Pointer thing should be understand-able.
If you look at the Name Faker (Dragon v6) release with the open source, you will see how the set-up should be

Good Luck
Posts 1–11 of 11 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?