Hi guys need help . I wanna make name faker . i done all in Jorndels tutorials about name faker .
Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
namespace faker
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
class NameFaker
{
[DllImport("kernel32.dll")]
private static extern IntPtr OpenProcess(UInt32 dwDesiredAccess, bool bInheritHandle, int dwProcessId);
[DllImport("kernel32.dll")]
private static extern Int32 ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [In, Out] byte[] buffer, UInt32 size, out IntPtr lpNumberOfBytesRead);
[DllImport("kernel32.dll")]
private static extern Int32 WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [In, Out] byte[] buffer, UInt32 size, out IntPtr lpNumberOfBytesWritten);
public void WriteString(int Address, string Text)
{
byte[] Buffer = new ASCIIEncoding().GetBytes(Text);
IntPtr Zero = IntPtr.Zero;
Convert.ToByte(10);
WriteProcessMemory(Open_Memory(), (IntPtr)Address, Buffer, (UInt32)25, out Zero);
}
private uint ReadInt(uint Addr)
{
byte[] buffer = new byte[4];
IntPtr R;
ReadProcessMemory(Open_Memory(), (IntPtr)Addr, buffer, 4, out R);
return BitConverter.ToUInt32(buffer, 0);
}
private IntPtr Open_Memory()
{
if (Process.GetProcessesByName("iw5mp").Length != 0)
{
return OpenProcess(0x1F0FFF, true, Process.GetProcessesByName("iw5mp")[0].Id);
}
else return (IntPtr)0x0;
}
private uint BaseAddress(string Module_Name)
{
if (Process.GetProcessesByName("iw5mp").Length != 0)
{
foreach (ProcessModule Mod in Process.GetProcessesByName("iw5mp")[0].Modules)
{
if (Mod.ModuleName == Module_Name)
return (uint)Mod.BaseAddress.ToInt32();
}
return 0;
}
else return 0;
}
public NameFaker(string Name)
{
uint Base = BaseAddress("steam_api.dll") + 0x0001824C;
uint Runner = ReadInt(Base) + 0x8;
Runner = ReadInt(Runner) + 0x10;
Runner = ReadInt(Runner) + 0x56;
WriteString((int)Runner, Name);
}
}
and this
Code:
private void button1_Click(object sender, EventArgs e)
{
NameFaker Fake = new NameFaker(textBox1.Text);
}
if its corect . then help me with Pointers