Results 1 to 2 of 2
  1. #1
    churkabes's Avatar
    Join Date
    Jul 2013
    Gender
    female
    Posts
    1
    Reputation
    10
    Thanks
    0

    Me need helping to find signature from rpm [c#]

    this code alway return -1, i scan game memory modules base adresses and all modules

    Code:
     int Counter = 0;
                int CapBytes = 0;
                int ProcessModuleSize;
                int ProcessBaseAddress;
                byte[] SearchValueByPattern;
                byte[] SearchValueByLinear;
                byte[] MemoryBuffer;
    
    
                Process ProcessData = Process.GetProcessesByName("myprocess")[0]; // Поиск процесса
                ProcessBaseAddress = (int)ProcessData.MainModule.BaseAddress;         // Базовый адресс процесса
                ProcessModuleSize = ProcessData.MainModule.ModuleMemorySize;    // Размер модуля процесса
                var x = ProcessData.Modules[0].ModuleMemorySize;
                MemoryBuffer = new byte[ProcessModuleSize];                // Инициализириую массив байтов размером модуля процесса 
                SearchValueByPattern = new byte[] { 0x41, 0x0A, 0x03, 0xF0, 0x00, 0x00, 0x00, 0x00 };       // Сигнатура для поиска адресса
                SearchValueByLinear = System.Text.Encoding.UTF8.GetBytes("967110984321231");     // Значение для поиска адресса
    
               /* foreach (ProcessModule item in ProcessData.Modules)
                {
                    dataGridView1****ws.Insert(0, item.ModuleName, Convert.ToString((int)item.BaseAddress, 16));
                }*/
                
    
    
                //richTextBox1.Text += "Module Size: " + ProcessModuleSize + "\n";
                //dataGridView1****ws.Insert(0, 1,2,3);
    
                for (int g = 0; g < ProcessData.Modules.Count; g++)
                {
                    ProcessBaseAddress = (int)ProcessData.Modules[g].BaseAddress;
                    MemoryBuffer = new byte[ProcessData.Modules[g].ModuleMemorySize];
                    ReadProcessMemory((int)ProcessData.Handle, ProcessBaseAddress, MemoryBuffer, MemoryBuffer.Length, ref CapBytes);
                    if (MemoryBuffer.Length >= SearchValueByPattern.Length)
                    {
                        for (int i = 0; i < MemoryBuffer.Length - SearchValueByPattern.Length; i++)
                        {
                            if (MemoryBuffer[i] == SearchValueByPattern[0])
                            {
                                for (int j = 0; j < SearchValueByPattern.Length; j++)
                                {
                                    if (MemoryBuffer[i + j] == SearchValueByPattern[j])
                                    {
                                        Counter++;
                                        if (Counter == SearchValueByPattern.Length)
                                        {
                                            MessageBox.Show("0x" + Convert.ToString(ProcessBaseAddress + i, 16).ToUpper());
                                            //return ProcessBaseAddress + i;
                                        }
                                    }
                                    else
                                    {
                                        Counter = 0;
                                    }
                                }
                            }
                        }
                    }
                }
    return -1;
    }
    why is it not working?
    sorry for my bad english guys..

  2. #2
    Silent's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    5,070
    Reputation
    2172
    Thanks
    8,474
    My Mood
    Bitchy
    Here what I use:

    usage:
    Code:
    PatternScan32("03 34 12 ? 4 ??");
    pattern scan code://Works with Jorndels class.
    Code:
        public int PatternScan32(string pattern, bool mainModule = true)//Don't recommend turning main module to false.
        {
            string[] splitPattern = pattern.Split(' ');
            bool[] indexValid = new bool[splitPattern.Length];
            byte[] indexValue = new byte[splitPattern.Length];
    
            byte tempByte = (byte)0x00;
    
            for (int i = 0; i < splitPattern.Length; i++)
            {
                indexValid[i] = !(splitPattern[i] == "??" || splitPattern[i] == "?");
                if (Byte.TryParse(splitPattern[i], out tempByte))
                    indexValue[i] = tempByte;
                else
                    indexValid[i] = false;
            }
    
    
            //searching memory part
            int startOfMemory = 0;
            int endOfMemory = 0;
    
            if(mainModule)
            {
                startOfMemory = attachedProcess.MainModule.BaseAddress.ToInt32();
                endOfMemory = attachedProcess.MainModule.ModuleMemorySize;
            }
            else
            {
                for (int i = 0; i < attachedProcess.Modules.Count; i++)
                    endOfMemory += attachedProcess.Modules[i].ModuleMemorySize;
            }
    
            for (int currentMemAddy = startOfMemory; currentMemAddy < endOfMemory; currentMemAddy++)
            {
                bool complete = false;
                for (int i = 0; i < splitPattern.Length; i++)
                {
                    if (!indexValid[i])
                        continue;
    
                    tempByte = ReadBytes32(currentMemAddy + i, 1)[0];
    
                    if (tempByte != indexValue[i])
                        break;
    
                    if (i == splitPattern.Length - 1)
                        complete = true;
    
                    if (complete)
                        break;
                }
    
                if (complete)
                    return currentMemAddy;
            }
    
            throw new Exception("Pattern not found!");
        }
    Click Here to visit the official MPGH wiki! Keep up with the latest news and information on games and MPGH! To check out pages dedicated to games, see the links below!











    dd/mm/yyyy
    Member - 31/01/2015
    Premium - 12/09/2016
    Call of Duty minion - 05/11/2016 - 05/11/2019
    BattleOn minion - 28/02/2017 - 05/11/2019
    Battlefield minion - 30/05/2017 - 05/11/2019
    Other Semi-Popular First Person Shooter Hacks minion - 21/09/2017 - 17/09/2019
    Publicist - 07/11/2017 - 02/08/2018
    Cock Sucker - 01/12/2017 - Unknown
    Minion+ - 06/03/2018 - 05/11/2019
    Fortnite minion - 08/05/2018 - 05/11/2019
    Head Publicist - 08/10/2018 - 10/01/2020
    Developer Team - 26/10/2019 - 10/01/2020
    Former Staff - 10/01/2020



Similar Threads

  1. [Help Request] I NEED HELP TO BECOME LE FROM MGE! CURRENTLY ON WINSTREAK! MOSTLY LOOKING FOR RAGE!
    By fisto456 in forum Counter-Strike 2 Boosting
    Replies: 0
    Last Post: 05-14-2015, 03:41 AM
  2. [Help Request] im need help to find the foge list in the doomed relam (most exact in the owl realms)
    By Edgar_Elrick in forum Realm of the Mad God Private Servers Help
    Replies: 8
    Last Post: 02-01-2015, 11:30 AM
  3. [Help Request] need help whit heal tool from admin menu
    By Black666Devil666 in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 4
    Last Post: 06-11-2011, 07:35 AM
  4. Need help with my signatures and pictures.
    By JustTheWind in forum Art & Graphic Design
    Replies: 2
    Last Post: 07-17-2009, 11:25 PM
  5. need help to find a bot
    By xtrylanx in forum Suggestions, Requests & General Help
    Replies: 2
    Last Post: 08-19-2007, 08:24 PM