Исходник трейнера на C# без дополнительных DLL(с помощью VAMemory) - Разработка ПО для Point Blank - Бюро разработчиков Zhyk.Ru: создание чит-программ и прочего ПО для Point Blank
22.06.2012, 21:24
#1
Старший сержант
Регистрация: 04.02.2011
Сообщений: 198
Популярность: 12244
Сказал(а) спасибо: 453
Поблагодарили 435 раз(а) в 242 сообщениях
Исходник трейнера на C# без дополнительных DLL(с помощью VAMemory)
Исходник трейнера, в данном случаи работающее ESP, без необходимости держать рядом с ExE, DLL VAMemory.dll...Класс прописан в коде...
[
Ссылки могут видеть только зарегистрированные пользователи. ]
Реализованы ГлобалКей...(указываются десятичным кодом [
Ссылки могут видеть только зарегистрированные пользователи. ])
Включение\выключение по нажатию клавиши "V"...
class VAMemory
Код:
public class VAMemory
{
private enum ProcessAccessFlags : uint
{
All = 0x1f0fff,
CreateThread = 2,
DupHandle = 0x40,
QueryInformation = 0x400,
SetInformation = 0x200,
Synchronize = 0x100000,
Terminate = 1,
VMOperation = 8,
VMRead = 0x10,
VMWrite = 0x20
}
private enum VirtualMemoryProtection : uint
{
PAGE_EXECUTE = 0x10,
PAGE_EXECUTE_READ = 0x20,
PAGE_EXECUTE_READWRITE = 0x40,
PAGE_EXECUTE_WRITECOPY = 0x80,
PAGE_GUARD = 0x100,
PAGE_NOACCESS = 1,
PAGE_NOCACHE = 0x200,
PAGE_READONLY = 2,
PAGE_READWRITE = 4,
PAGE_WRITECOPY = 8,
PROCESS_ALL_ACCESS = 0x1f0fff
}
public static bool debugMode = false;
private IntPtr baseAddress;
private ProcessModule processModule;
private Process[] mainProcess;
private IntPtr processHandle;
public string processName
{
get;
set;
}
public long getBaseAddress
{
get
{
this.baseAddress = (IntPtr)0;
this.processModule = this.mainProcess[0].MainModule;
this.baseAddress = this.processModule.BaseAddress;
return (long)this.baseAddress;
}
}
[DllImport("kernel32.dll", SetLastError = true)]
private static extern bool ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] lpBuffer, uint dwSize, uint lpNumberOfBytesRead);
[DllImport("kernel32.dll")]
private static extern bool WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] lpBuffer, uint nSize, uint lpNumberOfBytesWritten);
[DllImport("kernel32.dll")]
private static extern IntPtr OpenProcess(uint dwDesiredAccess, bool bInheritHandle, int dwProcessId);
[DllImport("kernel32.dll")]
private static extern bool CloseHandle(IntPtr hObject);
[DllImport("kernel32.dll")]
private static extern bool VirtualProtectEx(IntPtr hProcess, IntPtr lpAddress, UIntPtr dwSize, uint flNewProtect, out uint lpflOldProtect);
[DllImport("kernel32.dll", ExactSpelling = true, SetLastError = true)]
private static extern IntPtr VirtualAllocEx(IntPtr hProcess, IntPtr lpAddress, uint dwSize, uint flAllocationType, uint flProtect);
public VAMemory()
{
}
public VAMemory(string pProcessName)
{
this.processName = pProcessName;
}
public bool CheckProcess()
{
bool result;
if (this.processName != null)
{
this.mainProcess = Process.GetProcessesByName(this.processName);
if (this.mainProcess.Length == 0)
{
this.ErrorProcessNotFound(this.processName);
result = false;
}
else
{
this.processHandle = VAMemory.OpenProcess(2035711u, false, this.mainProcess[0].Id);
if (this.processHandle == IntPtr.Zero)
{
this.ErrorProcessNotFound(this.processName);
result = false;
}
else
{
result = true;
}
}
}
else
{
MessageBox.Show("Programmer, define process name first!");
result = false;
}
return result;
}
public byte[] ReadByteArray(IntPtr pOffset, uint pSize)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
byte[] result;
try
{
uint flNewProtect;
VAMemory.VirtualProtectEx(this.processHandle, pOffset, (UIntPtr)pSize, 4u, out flNewProtect);
byte[] array = new byte[pSize];
VAMemory.ReadProcessMemory(this.processHandle, pOffset, array, pSize, 0u);
VAMemory.VirtualProtectEx(this.processHandle, pOffset, (UIntPtr)pSize, flNewProtect, out flNewProtect);
result = array;
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: ReadByteArray" + ex.ToString());
}
result = new byte[1];
}
return result;
}
public string ReadStringUnicode(IntPtr pOffset, uint pSize)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
string result;
try
{
result = Encoding.Unicode.GetString(this.ReadByteArray(pOffset, pSize), 0, (int)pSize);
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: ReadStringUnicode" + ex.ToString());
}
result = "";
}
return result;
}
public string ReadStringASCII(IntPtr pOffset, uint pSize)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
string result;
try
{
result = Encoding.ASCII.GetString(this.ReadByteArray(pOffset, pSize), 0, (int)pSize);
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: ReadStringASCII" + ex.ToString());
}
result = "";
}
return result;
}
public char ReadChar(IntPtr pOffset)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
char result;
try
{
result = BitConverter.ToChar(this.ReadByteArray(pOffset, 1u), 0);
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: ReadChar" + ex.ToString());
}
result = ' ';
}
return result;
}
public bool ReadBoolean(IntPtr pOffset)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
bool result;
try
{
result = BitConverter.ToBoolean(this.ReadByteArray(pOffset, 1u), 0);
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: ReadByte" + ex.ToString());
}
result = false;
}
return result;
}
public byte ReadByte(IntPtr pOffset)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
byte result;
try
{
result = this.ReadByteArray(pOffset, 1u)[0];
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: ReadByte" + ex.ToString());
}
result = 0;
}
return result;
}
public short ReadInt16(IntPtr pOffset)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
short result;
try
{
result = BitConverter.ToInt16(this.ReadByteArray(pOffset, 2u), 0);
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: ReadInt16" + ex.ToString());
}
result = 0;
}
return result;
}
public short ReadShort(IntPtr pOffset)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
short result;
try
{
result = BitConverter.ToInt16(this.ReadByteArray(pOffset, 2u), 0);
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: ReadInt16" + ex.ToString());
}
result = 0;
}
return result;
}
public int ReadInt32(IntPtr pOffset)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
int result;
try
{
result = BitConverter.ToInt32(this.ReadByteArray(pOffset, 4u), 0);
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: ReadInt32" + ex.ToString());
}
result = 0;
}
return result;
}
public int ReadInteger(IntPtr pOffset)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
int result;
try
{
result = BitConverter.ToInt32(this.ReadByteArray(pOffset, 4u), 0);
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: ReadInteger" + ex.ToString());
}
result = 0;
}
return result;
}
public long ReadInt64(IntPtr pOffset)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
long result;
try
{
result = BitConverter.ToInt64(this.ReadByteArray(pOffset, 8u), 0);
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: ReadInt64" + ex.ToString());
}
result = 0L;
}
return result;
}
public long ReadLong(IntPtr pOffset)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
long result;
try
{
result = BitConverter.ToInt64(this.ReadByteArray(pOffset, 8u), 0);
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: ReadLong" + ex.ToString());
}
result = 0L;
}
return result;
}
public ushort ReadUInt16(IntPtr pOffset)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
ushort result;
try
{
result = BitConverter.ToUInt16(this.ReadByteArray(pOffset, 2u), 0);
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: ReadUInt16" + ex.ToString());
}
result = 0;
}
return result;
}
public ushort ReadUShort(IntPtr pOffset)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
ushort result;
try
{
result = BitConverter.ToUInt16(this.ReadByteArray(pOffset, 2u), 0);
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: ReadUShort" + ex.ToString());
}
result = 0;
}
return result;
}
public uint ReadUInt32(IntPtr pOffset)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
uint result;
try
{
result = BitConverter.ToUInt32(this.ReadByteArray(pOffset, 4u), 0);
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: ReadUInt32" + ex.ToString());
}
result = 0u;
}
return result;
}
public uint ReadUInteger(IntPtr pOffset)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
uint result;
try
{
result = BitConverter.ToUInt32(this.ReadByteArray(pOffset, 4u), 0);
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: ReadUInteger" + ex.ToString());
}
result = 0u;
}
return result;
}
public ulong ReadUInt64(IntPtr pOffset)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
ulong result;
try
{
result = BitConverter.ToUInt64(this.ReadByteArray(pOffset, 8u), 0);
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: ReadUInt64" + ex.ToString());
}
result = 0uL;
}
return result;
}
public long ReadULong(IntPtr pOffset)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
long result;
try
{
result = (long)BitConverter.ToUInt64(this.ReadByteArray(pOffset, 8u), 0);
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: ReadULong" + ex.ToString());
}
result = 0L;
}
return result;
}
public float ReadFloat(IntPtr pOffset)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
float result;
try
{
result = BitConverter.ToSingle(this.ReadByteArray(pOffset, 4u), 0);
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: ReadFloat" + ex.ToString());
}
result = 0f;
}
return result;
}
public double ReadDouble(IntPtr pOffset)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
double result;
try
{
result = BitConverter.ToDouble(this.ReadByteArray(pOffset, 8u), 0);
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: ReadDouble" + ex.ToString());
}
result = 0.0;
}
return result;
}
public bool WriteByteArray(IntPtr pOffset, byte[] pBytes)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
bool result;
try
{
uint flNewProtect;
VAMemory.VirtualProtectEx(this.processHandle, pOffset, (UIntPtr)((ulong)((long)pBytes.Length)), 4u, out flNewProtect);
bool flag = VAMemory.WriteProcessMemory(this.processHandle, pOffset, pBytes, (uint)pBytes.Length, 0u);
VAMemory.VirtualProtectEx(this.processHandle, pOffset, (UIntPtr)((ulong)((long)pBytes.Length)), flNewProtect, out flNewProtect);
result = flag;
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: WriteByteArray" + ex.ToString());
}
result = false;
}
return result;
}
public bool WriteStringUnicode(IntPtr pOffset, string pData)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
bool result;
try
{
result = this.WriteByteArray(pOffset, Encoding.Unicode.GetBytes(pData));
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: WriteStringUnicode" + ex.ToString());
}
result = false;
}
return result;
}
public bool WriteStringASCII(IntPtr pOffset, string pData)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
bool result;
try
{
result = this.WriteByteArray(pOffset, Encoding.ASCII.GetBytes(pData));
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: WriteStringASCII" + ex.ToString());
}
result = false;
}
return result;
}
public bool WriteBoolean(IntPtr pOffset, bool pData)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
bool result;
try
{
result = this.WriteByteArray(pOffset, BitConverter.GetBytes(pData));
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: WriteBoolean" + ex.ToString());
}
result = false;
}
return result;
}
public bool WriteChar(IntPtr pOffset, char pData)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
bool result;
try
{
result = this.WriteByteArray(pOffset, BitConverter.GetBytes(pData));
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: WriteChar" + ex.ToString());
}
result = false;
}
return result;
}
public bool WriteByte(IntPtr pOffset, byte pData)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
bool result;
try
{
result = this.WriteByteArray(pOffset, BitConverter.GetBytes((short)pData));
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: WriteByte" + ex.ToString());
}
result = false;
}
return result;
}
public bool WriteInt16(IntPtr pOffset, short pData)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
bool result;
try
{
result = this.WriteByteArray(pOffset, BitConverter.GetBytes(pData));
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: WriteInt16" + ex.ToString());
}
result = false;
}
return result;
}
public bool WriteShort(IntPtr pOffset, short pData)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
bool result;
try
{
result = this.WriteByteArray(pOffset, BitConverter.GetBytes(pData));
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: WriteShort" + ex.ToString());
}
result = false;
}
return result;
}
public bool WriteInt32(IntPtr pOffset, int pData)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
bool result;
try
{
result = this.WriteByteArray(pOffset, BitConverter.GetBytes(pData));
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: WriteInt32" + ex.ToString());
}
result = false;
}
return result;
}
public bool WriteInteger(IntPtr pOffset, int pData)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
bool result;
try
{
result = this.WriteByteArray(pOffset, BitConverter.GetBytes(pData));
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: WriteInt" + ex.ToString());
}
result = false;
}
return result;
}
public bool WriteInt64(IntPtr pOffset, long pData)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
bool result;
try
{
result = this.WriteByteArray(pOffset, BitConverter.GetBytes(pData));
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: WriteInt64" + ex.ToString());
}
result = false;
}
return result;
}
public bool WriteLong(IntPtr pOffset, long pData)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
bool result;
try
{
result = this.WriteByteArray(pOffset, BitConverter.GetBytes(pData));
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: WriteLong" + ex.ToString());
}
result = false;
}
return result;
}
public bool WriteUInt16(IntPtr pOffset, ushort pData)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
bool result;
try
{
result = this.WriteByteArray(pOffset, BitConverter.GetBytes(pData));
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: WriteUInt16" + ex.ToString());
}
result = false;
}
return result;
}
public bool WriteUShort(IntPtr pOffset, ushort pData)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
bool result;
try
{
result = this.WriteByteArray(pOffset, BitConverter.GetBytes(pData));
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: WriteShort" + ex.ToString());
}
result = false;
}
return result;
}
public bool WriteUInt32(IntPtr pOffset, uint pData)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
bool result;
try
{
result = this.WriteByteArray(pOffset, BitConverter.GetBytes(pData));
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: WriteUInt32" + ex.ToString());
}
result = false;
}
return result;
}
public bool WriteUInteger(IntPtr pOffset, uint pData)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
bool result;
try
{
result = this.WriteByteArray(pOffset, BitConverter.GetBytes(pData));
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: WriteUInt" + ex.ToString());
}
result = false;
}
return result;
}
public bool WriteUInt64(IntPtr pOffset, ulong pData)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
bool result;
try
{
result = this.WriteByteArray(pOffset, BitConverter.GetBytes(pData));
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: WriteUInt64" + ex.ToString());
}
result = false;
}
return result;
}
public bool WriteULong(IntPtr pOffset, ulong pData)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
bool result;
try
{
result = this.WriteByteArray(pOffset, BitConverter.GetBytes(pData));
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: WriteULong" + ex.ToString());
}
result = false;
}
return result;
}
public bool WriteFloat(IntPtr pOffset, float pData)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
bool result;
try
{
result = this.WriteByteArray(pOffset, BitConverter.GetBytes(pData));
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: WriteFloat" + ex.ToString());
}
result = false;
}
return result;
}
public bool WriteDouble(IntPtr pOffset, double pData)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
bool result;
try
{
result = this.WriteByteArray(pOffset, BitConverter.GetBytes(pData));
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: WriteDouble" + ex.ToString());
}
result = false;
}
return result;
}
private void ErrorProcessNotFound(string pProcessName)
{
MessageBox.Show(this.processName + " is not running or has not been found. Please check and try again", "Process Not Found", MessageBoxButtons.OK, MessageBoxIcon.Hand);
}
}
Требует:
Код:
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Text;
[
Ссылки могут видеть только зарегистрированные пользователи. ]
[
Ссылки могут видеть только зарегистрированные пользователи. ]
________________
-Отложи на послезавтра то что можешь сделать сегодня, и тогда у тебя появятся два свободных дня!
5 пользователя(ей) сказали cпасибо:
29.06.2012, 05:23
#2
Сержант
Регистрация: 20.06.2011
Сообщений: 154
Популярность: 8845
Золото Zhyk.Ru: 5
Сказал(а) спасибо: 777
Поблагодарили 370 раз(а) в 247 сообщениях
Re: Исходник трейнера на C# без дополнительных DLL(с помощью VAMemory)
скрытие я так понимаю самому?!
сяп за исход)
да и тут
разве не PointBlank.exe.exe ?
________________
Для просмотра ссылок или изображений в подписях, у Вас должно быть не менее 10 сообщение(ий). Сейчас у Вас 0 сообщение(ий). | Для просмотра ссылок или изображений в подписях, у Вас должно быть не менее 10 сообщение(ий). Сейчас у Вас 0 сообщение(ий).
Последний раз редактировалось maSter™; 29.06.2012 в 05:27 .
29.06.2012, 06:31
#3
Старший сержант
Регистрация: 04.02.2011
Сообщений: 198
Популярность: 12244
Сказал(а) спасибо: 453
Поблагодарили 435 раз(а) в 242 сообщениях
Re: Исходник трейнера на C# без дополнительных DLL(с помощью VAMemory)
________________
-Отложи на послезавтра то что можешь сделать сегодня, и тогда у тебя появятся два свободных дня!
29.06.2012, 11:11
#4
Старший сержант
Регистрация: 09.03.2012
Сообщений: 172
Популярность: 607
Сказал(а) спасибо: 368
Поблагодарили 112 раз(а) в 67 сообщениях
Re: Исходник трейнера на C# без дополнительных DLL(с помощью VAMemory)
maSter™ , какое скрытие это тренер,, не нужно там все правильно написано
04.07.2012, 11:53
#5
Разведчик
Регистрация: 19.10.2011
Сообщений: 4
Популярность: 10
Сказал(а) спасибо: 0
Поблагодарили 0 раз(а) в 0 сообщениях
Re: Исходник трейнера на C# без дополнительных DLL(с помощью VAMemory)
07.07.2012, 00:26
#6
Командор
Регистрация: 08.05.2011
Сообщений: 752
Популярность: 18860
Золото Zhyk.Ru: 8
Сказал(а) спасибо: 383
Поблагодарили 1,069 раз(а) в 448 сообщениях
Re: Исходник трейнера на C# без дополнительных DLL(с помощью VAMemory)
сразу видно, рефактор рулит
Почему у вас всегда активация/деактивация на разные кнопки?
можно же на 1 делать (вот один из примеров реализации ) :
Код:
static bool aktiv = true;
private void Button1_Click(object sender, EventArgt e)
{
if(aktiv == false)
{
Button1.Text = "Выключено";
//Тут функция деактивации
aktiv = true;
}
else
{
Button1.Text = "Включено";
//Тут функция активации
aktiv = false;
}
}
пишу в редакторе, так что мог где-то ошибиться
Добавлено через 13 часов 41 минуту
Кстати, в VAMemory есть ошибка в чтении байтов. Вроде вот такая, я уже не помню :
Цитата:
Твой код
Код:
public byte[] ReadByteArray(IntPtr pOffset, uint pSize)
{
if (this.processHandle == IntPtr.Zero)
{
this.CheckProcess();
}
byte[] result;
try
{
uint flNewProtect;
VAMemory.VirtualProtectEx(this.processHandle, pOffset, (UIntPtr)pSize, 4u, out flNewProtect);
byte[] array = new byte[pSize];
VAMemory.ReadProcessMemory(this.processHandle, pOffset, array, pSize, 0u);
VAMemory.VirtualProtectEx(this.processHandle, pOffset, (UIntPtr)pSize, flNewProtect, out flNewProtect);
result = array;
}
catch (Exception ex)
{
if (VAMemory.debugMode)
{
Console.WriteLine("Error: ReadByteArray" + ex.ToString());
}
result = new byte[1];
}
return result;
}
а вот какой должен быть:
Код:
public byte[] ReadByteArray(IntPtr pOffset, uint pSize)
{
if (this.processHandle == IntPtr.Zero) this.CheckProcess();
try
{
uint flNewProtect;
VAMemory.VirtualProtectEx(this.processHandle, pOffset, (UIntPtr)pSize, 4u, out flNewProtect);
byte[] array = new byte[(int)pSize];
VAMemory.ReadProcessMemory(this.processHandle, pOffset, array, pSize, 0u);
VAMemory.VirtualProtectEx(this.processHandle, pOffset, (UIntPtr)pSize, flNewProtect, out flNewProtect);
return array;
}
catch (Exception ex)
{
if (VAMemory.debugMode) MessageBox.Show("Error: ReadByteArray" + ex.ToString());
return null;
}
return null;
}
вроде так
________________
Для просмотра ссылок или изображений в подписях, у Вас должно быть не менее 10 сообщение(ий). Сейчас у Вас 0 сообщение(ий).
Для просмотра ссылок или изображений в подписях, у Вас должно быть не менее 10 сообщение(ий). Сейчас у Вас 0 сообщение(ий).
Последний раз редактировалось Skilful; 07.07.2012 в 16:53 .
Причина: Добавлено сообщение
09.07.2012, 20:12
#7
Старший сержант
Регистрация: 04.02.2011
Сообщений: 198
Популярность: 12244
Сказал(а) спасибо: 453
Поблагодарили 435 раз(а) в 242 сообщениях
Re: Исходник трейнера на C# без дополнительных DLL(с помощью VAMemory)
________________
-Отложи на послезавтра то что можешь сделать сегодня, и тогда у тебя появятся два свободных дня!
12.07.2012, 22:57
#8
Разведчик
Регистрация: 09.06.2012
Сообщений: 4
Популярность: 16
Сказал(а) спасибо: 0
Поблагодарили 3 раз(а) в 3 сообщениях
Re: Исходник трейнера на C# без дополнительных DLL(с помощью VAMemory)
13.07.2012, 00:11
#10
Разведчик
Регистрация: 09.06.2012
Сообщений: 4
Популярность: 16
Сказал(а) спасибо: 0
Поблагодарили 3 раз(а) в 3 сообщениях
Re: Исходник трейнера на C# без дополнительных DLL(с помощью VAMemory)
13.07.2012, 07:59
#11
Разведчик
Регистрация: 11.02.2011
Сообщений: 9
Популярность: 14
Сказал(а) спасибо: 12
Поблагодарили 2 раз(а) в 2 сообщениях
Re: Исходник трейнера на C# без дополнительных DLL(с помощью VAMemory)
if{StrikeF} , .... только х64
15.10.2017, 23:25
#12
Разведчик
Регистрация: 15.10.2017
Сообщений: 1
Популярность: 10
Сказал(а) спасибо: 0
Поблагодарили 0 раз(а) в 0 сообщениях
Re: Исходник трейнера на C# без дополнительных DLL(с помощью VAMemory)
Доброго времени суток, а можо ещё раз выложить пример кода?
Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения
HTML код Выкл.
Похожие темы
Тема
Автор
Раздел
Ответов
Последнее сообщение
Вопрос про VAMemory в C#
Никита1482
Школа Читера
10
20.03.2012 23:06
[Помогите!] VAMemory
BassBoy
Общение разработчиков
5
18.03.2012 23:41
VAMemory
WiLLi-WindowS
Вопросы и ответы, обсуждения
2
28.12.2011 15:13
Заявление об ответственности / Список мошенников
Часовой пояс GMT +4, время: 12:07 .