Get a numeric value or string from an address of an attached process

Total Post:412

Points:2888

C# 
C#
 1675  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. 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.

      Modified On Apr-04-2018 12:22:58 AM

Answer

Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.