[c# example] memory reading menu

Shout-Out

User Tag List

Results 1 to 7 of 7
  1. #1
    kantaki's Avatar Member
    Reputation
    5
    Join Date
    Oct 2008
    Posts
    48
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [c# example] memory reading

    Hello,

    i want to apologize for my previous questions here.
    i read many guides about memory reading in c#, especially for WoW.

    but i hate it to ask many questions and i dont wanna disturb you too much, so

    do u have an old source code in c# 4.0 that reads some information though memory reading from a program of your choice ? (without external dlls. for example , blackmagic )

    for example :
    i dont know...
    the url of an active internetexplorerwindow

    somthing like this.

    this would help me to get an overview of how it is done and with the well documented .net lib, it will be very easy for me to understand your code.

    ps:
    i read 1 book in c++ (primer)
    head first java
    heads first c#

    im still very unexperienced, but i hope you can help me with that.

    thanks

    [c# example] memory reading
  2. #2
    Sychotix's Avatar Moderator Authenticator enabled
    Reputation
    1441
    Join Date
    Apr 2006
    Posts
    3,996
    Thanks G/R
    294/585
    Trade Feedback
    1 (100%)
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    What you could do is attempt to use Cheat Engine on iexplorer.exe to find the text in the URL Textbox. Then, in order to read this dynamically, call ReadProcessMemory on the address (after opening up the process ofc) and read one character at a time until you reach a null character. Append all these characters together and then you will have a string.

  3. #3
    kantaki's Avatar Member
    Reputation
    5
    Join Date
    Oct 2008
    Posts
    48
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you, i will try it.

    ---------- Post added at 01:55 PM ---------- Previous post was at 12:44 PM ----------

    i followed a tutorial for runes of magic and i tried to convert their code for my usage, but i dont know.. something went wrong
    i just dont know what rw means and why the byte array has a length of 24.

    btw i know that i have to use the base + offset, but did i make it right ?

    i hope someone can tell me what i made wrong

    thank you <3
    edit:
    i read your post @sychotix
    but they used this method for getting a string. im confused
    Code:
     private void button1_Click(object sender, EventArgs e) {
    
                Process[] iexp = Process.GetProcessesByName("iexplore");
                if (iexp.Length == 0) {
                    listBox1.Items.Add("NOT FOUND");
                }
                Process internet = iexp[0];
                uint baseAddress = (uint)internet.MainModule.BaseAddress.ToInt32();
                IntPtr readHandle = OpenProcess(0x0010, false, (uint)internet.Id);
                byte[] bytes = new byte[24];
                uint rw = 0;
                uint size=sizeof(int);
    
                ReadProcessMemory(readHandle, ((IntPtr)baseAddress + 0x0D6B058E), bytes, (UIntPtr)24, ref rw);
                string ownedcore = Encoding.UTF8.GetString(bytes);
                ReadProcessMemory(readHandle, (IntPtr)baseAddress + 0x00528744, bytes, (UIntPtr)size, ref rw);
                int someNumber = BitConverter.ToInt32(bytes, 0);
    
                listBox1.Items.Add(ownedcore);
                listBox1.Items.Add(someNumber);
                
            }
        }
    Last edited by kantaki; 11-21-2011 at 03:19 PM.

  4. #4
    DarkLinux's Avatar Former Staff
    CoreCoins Purchaser Authenticator enabled
    Reputation
    1627
    Join Date
    May 2010
    Posts
    1,846
    Thanks G/R
    193/539
    Trade Feedback
    16 (100%)
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    You cant just copy and past it and ask why it does not work... You could try and look this stuff up... its not hard...

    ReadProcessMemory function
    You will find all information on ReadProcessMemory....

    Adding the base address is not always used for every programs..

    All the code does is read the values as bytes and then converts it into a string. No idea about the 24.. it could be as long as you want really..
    Example : Reads 0x41 and then converts it into the letter A... I think...

    I have no idea if your offsets are correct... but other than that... looks good... I dont know C# that well. I would use C++ but thats up 2 you
    Last edited by DarkLinux; 11-24-2011 at 10:07 PM.

  5. #5
    kantaki's Avatar Member
    Reputation
    5
    Join Date
    Oct 2008
    Posts
    48
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by DarkLinux View Post
    You cant just copy and past it and ask why it does not work... You could try and look this stuff up... its not hard...

    ReadProcessMemory function
    You will find all information on ReadProcessMemory....

    Adding the base address is not always used for every programs..

    All the code does is read the values as bytes and then converts it into a string. No idea about the 24.. it could be as long as you want really..
    Example : Reads 0x41 and then converts it into the letter A... I think...

    I have no idea if your offsets are correct... but other than that... looks good... I dont know C# that well. I would use C++ but thats up 2 you
    yes after spending i dont know 50 hours, im nearly finished with the basics =D. yes i was realy slow.
    atm my problem is that my baseaddress from c# is wrong

  6. #6
    DarkLinux's Avatar Former Staff
    CoreCoins Purchaser Authenticator enabled
    Reputation
    1627
    Join Date
    May 2010
    Posts
    1,846
    Thanks G/R
    193/539
    Trade Feedback
    16 (100%)
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    I dont use C#, so I dont really know how to get that base-address, but take a look at BlackRain,
    ObjectManager.cs - blackrainobjects - A simple but effective Object Manager for World of Warcraft in C# - Google Project Hosting

    Code:
            private static uint WowBaseAddress
            {
                get 
                {
                    return WowProcess.MainModule == null ? 0 : (uint)WowProcess.MainModule.BaseAddress;
                }
            }

  7. #7
    wildrunner's Avatar Sergeant
    Reputation
    9
    Join Date
    Jan 2012
    Posts
    49
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    do they only use integers or can they use floats aswell?

Similar Threads

  1. Replies: 1
    Last Post: 11-30-2011, 02:36 PM
  2. [Request][Bounty] WoW memory reading example script c++
    By foxlin in forum WoW Bots Questions & Requests
    Replies: 4
    Last Post: 07-27-2011, 09:08 AM
  3. [Example] Check if spell is available with memory reading
    By orby_tale in forum WoW Memory Editing
    Replies: 1
    Last Post: 11-14-2010, 05:14 PM
  4. [C# + Win32] Memory Reading Class Example
    By joetheodd in forum WoW Memory Editing
    Replies: 29
    Last Post: 08-04-2009, 08:35 PM
  5. [AutoIT3] WoW Cordinator (X,Y,MapID and rotation memory reading)
    By Vladinator in forum World of Warcraft Bots and Programs
    Replies: 22
    Last Post: 05-15-2007, 03:26 AM
All times are GMT -5. The time now is 01:56 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search