ASSINISS How do I cheat?
Reputation: 0
Joined: 11 Jul 2013 Posts: 5
|
Posted: Sun Jul 14, 2013 11:14 am Post subject: [C#] Please Help With Read Adress Value (problem resolved) |
|
|
PLEASE HELP ME i dont see any error
Code:
class MAIN
{
#region WINAPI
[DllImport("Kernel32.dll")]
private static extern IntPtr OpenProcess(
uint dwDesiredAccess,
bool bInheritHandle,
int dwProcessId);
[DllImport("Kernel32.dll")]
private static extern IntPtr ReadProcessMemory(
IntPtr hProcess,
uint lpBaseAddress,
byte[] lpBuffer,
int nSize,
out int lpNumberOfBytesRead);
[DllImport("Kernel32.dll")]
private static extern IntPtr WriteProcessMemory(
IntPtr hProcess,
uint lpBaseAddress,
byte[] lpBuffer,
int nSize,
out int lpNumberOfBytesWritten);
#endregion
Process CurretProcess;
IntPtr hProcess;
public MAIN()
{
// Target Process
try
{
CurretProcess = Process.GetProcessesByName("Tutorial-i386")[0];
}
catch
{
Console.WriteLine("Please start process");
}
//
// Set hProcess
if (CurretProcess != null)
{
hProcess = OpenProcess(0x1F0FFF, false, CurretProcess.Id);
//
// Set Address and Offset
int address = int.Parse("555EB0", System.Globalization.NumberStyles.HexNumber);
//
// Get Values
byte[] Value = new byte[sizeof(int)];
int bytes_readed;
ReadProcessMemory(hProcess, (uint)address, Value, Value.Length, out bytes_readed);
Console.WriteLine(Value[0]);
//
}
Console.ReadLine();
}
}
Description: |
|
Filesize: |
466.3 KB |
Viewed: |
4007 Time(s) |

|
Last edited by ASSINISS on Mon Jul 15, 2013 4:40 am; edited 1 time in total |
|