using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Diagnostics;
using System.Runtime.InteropServices;
using Teknolider;
namespace WindowsFormsApp34
{
public partial class Form1 : Form
{
[DllImport("Kernel32.dll")]
public static extern IntPtr OpenProcess(
uint dwDesiredAccess,
bool bInheritHandle,
int dwProcessId);
[DllImport("Kernel32.dll")]
public static extern bool WriteProcessMemory(
IntPtr Process,
uint lpBaseAdress,
byte[] lpBuffer,
int nSize,
out int lpNumberofBytesRead);
private static Process oyun;
private static IntPtr hProcess;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
oyun = Process.GetProcessesByName("hl")[0];
hProcess = OpenProcess(0x1F0FF, false, oyun.Id);
}
private void button1_Click(object sender, EventArgs e)
{
byte[] data = BitConverter.GetBytes(Convert.ToInt32(textBox1.Text));
int read;
WriteProcessMemory(hProcess, 0x0613FB5C, data, data.Length, out read);
}
}
}
merhabalar, bildiginiz gibi online oyunlarda kalıcı pointerların yanında bir de offset ler bulunur. WriteProcessMemory'i kullanarak offseti nereye yazacağımı bulamadım.