C# Memory Framework.

09/17/2008 14:55 `xEnt#1
Hi, so i was taking a look around the whole memory hacks here, and well they pretty much all seemed to be in VB6, since i purposely forgot VB6 i wrote an easy to use framework for C# users if they ever wanted to make there own hacks.

It uses Java naming conventions as i'm mainly a Java programmer, its a habit.

I didn't see any other open source C# projects, so take this as a "starter kit"

Example/Usage:

Here is an example of a method (which all your methods will go in the Client class)

public string getCharName()
{
return getString((IntPtr)0x0056D134);
}

Client class extends MemoryHandler which has methods to actually set/get the int/string to/from the selected memory address.

In the main Form1.cs (with the GUI designer) is where you may use the methods that i have in there (which is only a few) or create your own.

textBox1.Text = client.getCharName();

now that would display your selected textbox with your character name.

Usages for setting (example)

public void setCharacterName(string name)
{
setString((IntPtr)0x0056D134, name);
}

so in Form1 i could do something like

private void button1_Click(object sender, EventArgs e)
{
client.setCharacterName(textBox2.Text);
}

Which would set it to whatever you wrote in textBox2.

Enjoy [Only registered and activated users can see links. Click Here To Register...]

Had to use Uppit, would not let me upload internally.
09/22/2008 14:17 Leo_2#2
Thx, may come in useful :)
10/18/2008 18:12 masteryoda1047#3
thanks, gonna use that in my project
10/20/2008 15:31 z3oN#4
i was looking for it :DDD
10/20/2008 15:49 high6#5
is it just me or will your get/set string not work past 4 bytes?
10/21/2008 04:39 iliveoncaffiene#6
Quote:
Originally Posted by high6 View Post
is it just me or will your get/set string not work past 4 bytes?
What do you mean? I don't know exactly how getString is defined or what that specific address points to..... in fact, I'm not sure if that IntPtr is to a char*, or to the actual string data.

In either case, why would it be restricted to 4 bytes?
10/21/2008 20:20 masteryoda1047#7
has anyone the complete memory adresses for the lastest client version?

edit:
i use this to read the characters name:

IntPtr iCharnameAddress = (IntPtr)0x0057B604;
int iChar,iCharclass;
uint Charlenght = 20;
byte[] memory = new byte[20];
memory = pReader.ReadProcessMemory((IntPtr)iClassAddress, Charlenght, out bytesReaded);
for (int i = 0; i < memory.Length; i++)
{
iCharclass = memory[i];
string sChar = ((char)iCharclass).ToString();
tbClass.Text += sChar;
}
10/21/2008 20:32 high6#8
Quote:
Originally Posted by iliveoncaffiene View Post
What do you mean? I don't know exactly how getString is defined or what that specific address points to..... in fact, I'm not sure if that IntPtr is to a char*, or to the actual string data.

In either case, why would it be restricted to 4 bytes?
public string getString(IntPtr Address)
{
try
{
if (!Client.PROCESS_FOUND)
return null;

ReadProcessMemory(hProc, Address, ByteBuffer, 4, out Bytes);
return System.Text.Encoding.ASCII.GetString(ByteBuffer);
}
catch (Exception e)
{
Debug.Print(e.Message);
return null;
}
}

The 4 is how many bytes it is reading.

and it isn't reading a char*.
10/21/2008 20:53 zarut#9
could you make this same in console application? i dont really like playing with windows applications and some how cant turn it myself to console :/
10/23/2008 00:30 lostsolder05#10
lol, wow im pretty sure i released mt memoryprocessor.cs so it can be used for this exact thing. Plus its 10x easier