GET A NUMERIC VALUE OR STRING FROM AN ADDRESS OF AN ATTACHED PROCESS

Pravesh Singh

Total Post:412

Points:2888
Posted by  Pravesh Singh
C# 
C#
 1234  View(s)
Ratings:
Rate this:

I am building a small tool which allows me to edit in real time the memory of an attached process.

so the tool has 1 numericUpDown and 2 buttons, a get and a set.

my set code is as followed

private void sendButton_Click(object sender, EventArgs e)

{

    byte[] stat = BitConverter.GetBytes(Convert.ToInt32(statNumericUpDown.Value.ToString()));

    SetMemory(0x0175914a, stat);

}

where I am stuck is reversing that process so I can get numbers from my attached process and send them to my numericUpDown.

I hope I explained well enough and any help would be much appreciated.

  1. ezra heywood

    Post:145

    Points:1019
    Re: Get a numeric value or string from an address of an attached process

    Hi Pravesh,


    Surely the reverse of the process would simply be the reverse of what you have, i.e.:

    byte[] statBytes = GetMemory(0x0175914a);

    int stat = BitConverter.ToInt32(statBytes);

    statNumericUpDown.Value = stat;

    The key is BitConverter.ToInt32 for converting from a byte[] to an Int32.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!