27.03.2018, 16:37
|
#3
|
Забанен за кидаловo/обман/развод
Регистрация: 29.08.2012
Возраст: 29
Сообщений: 538
Отблагодарили 6 раз(а)
Рейтинг мнений:
|
Re: c# dll замена байт
Цитата:
Сообщение от Awiion
Свернуть ↑
[CODE]
const int PROCESS_VM_WRITE = 0x0020;
const int PROCESS_VM_OPERATION = 0x0008;
[DllImport("kernel32.dll")]
public static extern IntPtr OpenProcess(int dwDesiredAccess, bool bInheritHandle, int dwProcessId);
[DllImport("kernel32.dll", SetLastError = true)]
static extern bool WriteProcessMemory(int hProcess, int lpBaseAddress,
byte[] lpBuffer, int dwSize, ref int lpNumberOfBytesWritten);Code: C# 2.
Код:
Process process = new Process();
string Login = "Tester";
string Password = "1234";
string Patch = "D:/Games/PointBlank/";
int Addr = 0x408B1D; // Адрес функции jnz
process.StartInfo = new ProcessStartInfo
{
FileName = Patch + "PointBlank.exe",
Arguments = Login + " " + Password,
};
process.StartInfo.WorkingDirectory = Patch;
process.Start();
IntPtr processHandle = OpenProcess(0x1F0FFF, false, process.Id);
int bytesWritten = 0;
WriteProcessMemory((int)processHandle, Addr, new byte[] { 0x90, 0x90 }, 2, ref bytesWritten); //Nop (90)Code: C#
Свернуть ↑Развернуть ↓
|
если так закинуть в dll то будет работать?
|
|
|