Üye
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Runtime.InteropServices;
namespace aobscan
{
internal class Program
{
[DllImport("kernel32.dll")]
static extern bool ReadProcessMemory(IntPtr handle, IntPtr addy, byte[] buffer, int size, ref int bytesread);
static void Main(string[] args)
{
Process proc = Process.GetProcessesByName("craftrise-x64")[0];
byte[] buffer = new byte[proc.MainModule.ModuleMemorySize];
int bytesread = 0;
ReadProcessMemory(proc.Handle, proc.MainModule.BaseAddress, buffer, buffer.Length, ref bytesread);
string sigscan = "C5 F9 2E ?? 24 ?? ?? ?? ?? 7A";
var addy = SigScan(sigscan, buffer, proc);
Console.WriteLine(addy[0].ToString("X"));
Console.ReadLine();
}
static int[] TransformArray(string sig)
{
var bytes = sig.Split(' ');
int[] inlist = new int[bytes.Length];
for (int i = 0; i < bytes.Length; i++)
{
if (bytes[i] == "??")
inlist[i] = -1;
else
inlist[i] = int.Parse(bytes[i], NumberStyles.HexNumber);
}
return inlist;
}
static List<IntPtr> SigScan(string sig, byte[] buffer, Process proc)
{
var intlist = TransformArray(sig);
var results = new List<IntPtr>();
for (int a = 0; a < buffer.Length; a++)
{
for (int b = 0; b < intlist.Length; b++)
{
if (intlist[b] != -1 && intlist[b] != buffer[a + b])
break;
if (b + 1 == intlist.Length)
{
var result = new IntPtr(a + (int)proc.MainModule.BaseAddress);
results.Add(result);
}
}
}
return results;
}
}
}
teşekkür ederim bide rica etsem discord adresinizi verebilirmisiniz yardıma ihtiyacım olduğunda yazarım c# konusundaBağlantıları görmek için lütfen Giriş Yap
Denedikten sonra bir sorunla karşılaşırsan buraya yaz yardımcı olmaya çalışırım. Formatlamasını düzeltmek için snippet olarak yükledim.
Bağlantıları görmek için lütfen Giriş Yap
Denedikten sonra bir sorunla karşılaşırsan buraya yaz yardımcı olmaya çalışırım. Formatlamasını düzeltmek için snippet olarak yükledim.
using System;
using System.Diagnostics;
using System.Linq;
namespace AOBScan
{
class Program
{
static void Main(string[] args)
{
// Process adı
string processName = "notepad";
// AOB (Array of Bytes)
byte[] signature = new byte[] { 0x48, 0x8B, 0x05, 0x00, 0x00, 0x00, 0x00, 0xC3 };
// İşlemi seç
Process process = Process.GetProcessesByName(processName).FirstOrDefault();
// Eğer işlem bulunamadıysa hata ver
if (process == null)
{
Console.WriteLine("İşlem bulunamadı.");
return;
}
// Bellek alanı tarama
IntPtr address = Scan(process, signature);
// Eğer bellek alanında tarama yapılamadıysa hata ver
if (address == IntPtr.Zero)
{
Console.WriteLine("AOB bulunamadı.");
return;
}
Console.WriteLine("AOB bulundu: 0x" + address.ToString("X"));
}
private static IntPtr Scan(Process process, byte[] signature)
{
// Bellek alanı okuma izni
IntPtr baseAddress = process.MainModule.BaseAddress;
int size = process.MainModule.ModuleMemorySize;
// Bellek alanını byte dizisine ata
byte[] buffer = new byte[size];
IntPtr readBytes = IntPtr.Zero;
WinApi.ReadProcessMemory(process.Handle, baseAddress, buffer, size, out readBytes);
// Bellek alanındaki byte dizisini tarama
for (int i = 0; i < size - signature.Length; i++)
{
bool found = true;
for (int j = 0; j < signature.Length; j++)
{
if (buffer[i + j] != signature[j])
{
found = false;
break;
}
}
if (found)
{
return baseAddress + i;
}
}
return IntPtr.Zero;
}
}
internal static class WinApi
{
[System.Runtime.InteropServices.DllImport("kernel32.dll")]
public static extern bool ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [System.Runtime.InteropServices.In, System.Runtime.InteropServices.Out] byte[] buffer, int size, out IntPtr lpNumberOfBytesRead);
}
}
bir şey sorucamHocam eğer basit C# bilginiz yok ise sorun ilerde sorun yaşayabilirsiniz. @Motorhead999 adlı kullanıcıdan alıntıdır ;
C#:using System; using System.Diagnostics; using System.Linq; namespace AOBScan { class Program { static void Main(string[] args) { // Process adı string processName = "notepad"; // AOB (Array of Bytes) byte[] signature = new byte[] { 0x48, 0x8B, 0x05, 0x00, 0x00, 0x00, 0x00, 0xC3 }; // İşlemi seç Process process = Process.GetProcessesByName(processName).FirstOrDefault(); // Eğer işlem bulunamadıysa hata ver if (process == null) { Console.WriteLine("İşlem bulunamadı."); return; } // Bellek alanı tarama IntPtr address = Scan(process, signature); // Eğer bellek alanında tarama yapılamadıysa hata ver if (address == IntPtr.Zero) { Console.WriteLine("AOB bulunamadı."); return; } Console.WriteLine("AOB bulundu: 0x" + address.ToString("X")); } private static IntPtr Scan(Process process, byte[] signature) { // Bellek alanı okuma izni IntPtr baseAddress = process.MainModule.BaseAddress; int size = process.MainModule.ModuleMemorySize; // Bellek alanını byte dizisine ata byte[] buffer = new byte[size]; IntPtr readBytes = IntPtr.Zero; WinApi.ReadProcessMemory(process.Handle, baseAddress, buffer, size, out readBytes); // Bellek alanındaki byte dizisini tarama for (int i = 0; i < size - signature.Length; i++) { bool found = true; for (int j = 0; j < signature.Length; j++) { if (buffer[i + j] != signature[j]) { found = false; break; } } if (found) { return baseAddress + i; } } return IntPtr.Zero; } } internal static class WinApi { [System.Runtime.InteropServices.DllImport("kernel32.dll")] public static extern bool ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [System.Runtime.InteropServices.In, System.Runtime.InteropServices.Out] byte[] buffer, int size, out IntPtr lpNumberOfBytesRead); } }
peki kısa sürede öğreebileceğim bi kaynak var mıHocam dediğim gibi hem reverse engineering hem de ileri düzey C++/C# bilgisi olmadan projenizde çok ilerleyemezsiniz.
BryceKag#8449 buyrunnteşekkürler fakat aob scanın yapma amacının ne olduğunu tam olarak anlayamadım dcniz var ise ulaşabilir miyim
hile yazıcam onun içinanlatılmak isteneni anlamadım
hile yazıcam onuun içinteşekkürler fakat aob scanın yapma amacının ne olduğunu tam olarak anlayamadım dcniz var ise ulaşabilir miyim
Kısa bir sürede maalesef öğrenemezsiniz ikisi de zaman ayırman gereken konular.peki kısa sürede öğreebileceğim bi kaynak var mı
Post automatically merged:
BryceKag#8449 buyrunn
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?