C# Compact & usefull memory accessing class
Introducing a C# class to access process memory, called 'ProcessMemoryAccessor'...
You could easily create a new 'ProcessMemoryAccessor' object by giving a Process to its constructor..
You could also give 'ProcessAccessTypes' flags to its construtor, but they're default set to read & write..
If you successfully created a new 'ProcessMemoryAccessor' object you're able to use a few methods to access its memory content..
So lets check an example..
Hope you'll enjoy it. Questions? pm... 
http://virusscan.jotti.org/en/scanre...927172560e09ed
https://www.virustotal.com/file/6e20...is/1355009214/
You could easily create a new 'ProcessMemoryAccessor' object by giving a Process to its constructor..
Code:
ProcessMemoryAccessor testPma = new ProcessMemoryAccessor(ProcessMemoryAccessor.GetProcessByName("iw5mp"));
Code:
[Flags]
public enum ProcessAccessTypes
{
TERMINATE = (0x0001),
CREATE_THREAD = (0x0002),
SET_SESSIONID = (0x0004),
VM_OPERATION = (0x0008),
VM_READ = (0x0010),
VM_WRITE = (0x0020),
DUP_HANDLE = (0x0040),
CREATE_PROCESS = (0x0080),
SET_QUOTA = (0x0100),
SET_INFORMATION = (0x0200),
QUERY_INFORMATION = (0x0400)
}
Code:
public IntPtr GetModuleBaseByName(); // gets the baseaddress of a module of the current process public byte[] ReadMemory(); // reads raw memory public string ReadString(); // reads raw memory and converts it to string public int ReadInteger(); // reads raw memory and converts it to int public float ReadFloat(); // reads raw memory and converts it to float public void WriteMemory(); // writes raw memory (bytes[]) public void WriteString(); // writes memory (string) public void WriteInteger(); // writes memory (int) public void WriteFloat(); // writes memory (float) public void FreezeMemory(); // freezes a memoryaddress value public void UnfreezeMemory(); // unfreezes a memoryaddress value, if freezed public void Close();
Code:
using System;
using System.Diagnostics; // required (Process,...)
using System.MemoryAccessing; // required (ProcessMemoryAccessor)
namespace Test{
class Programm{
static void Main(string[] args){
Process mw3Proc = null;
while (true){
mw3Proc = ProcessMemoryAccessor.GetProcessByName("iw5mp");
if (mw3Proc != null) break;
}
ProcessMemoryAccessor pma = ProcessMemoryAccessor(mw3Proc);
int myPrestige = pma.ReadInteger(0x1DBD448);
pma.Close();
Console.WriteLine("My prestige lvl: " + myPrestige);
Console.ReadKey();
}
}
}

http://virusscan.jotti.org/en/scanre...927172560e09ed
https://www.virustotal.com/file/6e20...is/1355009214/

