EMO Style ForumPro - Hos Geldiniz
C# Memory Library Uyeols10

Join the forum, it's quick and easy

EMO Style ForumPro - Hos Geldiniz
C# Memory Library Uyeols10
EMO Style ForumPro - Hos Geldiniz
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Giriş yap

Şifremi unuttum

Istatistikler
Toplam 203 kayıtlı kullanıcımız var
Son kaydolan kullanıcımız: crayzboy76

Kullanıcılarımız toplam 1186 mesaj attılar bunda 862 konu
Tarıyıcı
 Kapı
 Indeks
 Üye Listesi
 Profil
 SSS
 Arama
Arama
 
 

Sonuç :
 


Rechercher çıkıntı araştırma

RSS akısı


Yahoo! 
MSN 
AOL 
Netvibes 
Bloglines 


Anahtar-kelime

loot  kutu  pointer  

Kimler hatta?
Toplam 2 kullanıcı online :: 0 Kayıtlı, 0 Gizli ve 2 Misafir

Yok

[ Bütün listeye bak ]


Sitede bugüne kadar en çok 217 kişi C.tesi Tem. 29, 2017 1:46 am tarihinde online oldu.
En son konular
» İnternetten Para Kazandıran Oyun ! Ödeme Alt Limiti Yok ! DEV KONU
C# Memory Library I_icon_minitimeCuma Ağus. 29, 2014 8:33 am tarafından Hello EMO

» goldenchase.net maden yaparak para kazanma
C# Memory Library I_icon_minitimeCuma Ağus. 29, 2014 8:18 am tarafından Hello EMO

» etichal hacker görsel egitim seti
C# Memory Library I_icon_minitimeÇarş. Ağus. 06, 2014 4:57 am tarafından Hello EMO

» KO TBL Source C#
C# Memory Library I_icon_minitimePtsi Ara. 09, 2013 6:36 am tarafından Hello EMO

» x86 Registers
C# Memory Library I_icon_minitimeC.tesi Ağus. 24, 2013 5:02 am tarafından Hello EMO

» [Tutorial] Pegando Address, Pointers de WYD
C# Memory Library I_icon_minitimeÇarş. Tem. 10, 2013 7:25 am tarafından Hello EMO

» [Tutorial] Pegando Address, Pointers de CS Metodo²
C# Memory Library I_icon_minitimeÇarş. Tem. 10, 2013 7:23 am tarafından Hello EMO

» [Tutorial] Aprendendo basico deASM OLLYDBG
C# Memory Library I_icon_minitimeÇarş. Tem. 10, 2013 7:22 am tarafından Hello EMO

» Basic C# DLL injector
C# Memory Library I_icon_minitimePtsi Tem. 08, 2013 7:48 am tarafından Hello EMO

Reklam

C# Memory Library

Aşağa gitmek

C# Memory Library Empty C# Memory Library

Mesaj tarafından EMO Perş. Haz. 02, 2011 8:40 am

Hello everyone,



Today I present my .NET Memory Library/Class. (It has only been tested with C# thus far, and anybody willing to test and report will be appreciated!)

Please note that it IS a work in progress. If problems are reported or more features are suggested I will update it!



It's quite similar to this one, but, believe it or not, I didn't actually see this one until I was almost done with mine.

Some of the memory methods were also taken from here, and modified.



Date: January 28, 2011

Version: 1.0.0.4

Download: http://www.mediafire.com/?z2q790g03by1d



Note: You must add the DLL as a Reference to the Project, and then put
Code:
using MemoryEditor;
at the top of your Project.



Functions:

Code:
//Open Process

bool OpenProcess() //Opens Current Process

bool OpenProcess(string sProcessName) //Opens Process by Name

bool OpenProcess(int iProcessID) //Opens Process by PID



//Get Modules

ProcessModuleCollection GetModules() //Returns a list of Modules associated with the Process



//Get Process Info

string Name() //Returns the Process' Name

int PID() //Returns the Process' ID

int SID() //Returns the Session ID

string FileVersion() //Returns the Process' File Version

string StartTime() //Returns the Process' Start Time



//Get Module Info

int BaseAddress() //Returns the Main Module's Base Address

int BaseAddress(string sModuleName) //Returns the Module's Base Address

int EntryPoint() //Returns the Main Module's Entry Address

int EntryPoint(string sModuleName) //Returns the Module's Entry Address

int MemorySize() //Returns the Main Module's Size in Memory

int MemorySize(string sModuleName) //Returns the Module's Size in Memory



//Read from Address

byte ReadByte(int iMemoryAddress) //Reads a Byte from an Address

ushort ReadShort(int iMemoryAddress) //Reads a Short from an Address

uint ReadInt(int iMemoryAddress) //Reads an Integer from an Address

long ReadLong(int iMemoryAddress) //Reads a Long from an Address

float ReadFloat(int iMemoryAddress) //Reads a Float from an Address

double ReadDouble(int iMemoryAddress) //Reads a Double from an Address

string ReadString(int iMemoryAddress, uint iTextLength, int iMode = 0) //Reads a String from an Address. iMode explained below

byte[] ReadAOB(int iMemoryAddress, uint iBytesToRead) //Reads a Byte Array from an Address



//Write to Address

bool Write(int iMemoryAddress, byte bByteToWrite) //Writes a Byte to an Address

bool Write(int iMemoryAddress, short iShortToWrite) //Writes a Short to an Address

bool Write(int iMemoryAddress, int iIntToWrite) //Writes an Integer to an Address

bool Write(int iMemoryAddress, long iLongToWrite) //Writes a Long to an Address

bool Write(int iMemoryAddress, float iFloatToWrite) //Writes a Float to an Address

bool Write(int iMemoryAddress, double iDoubleToWrite) //Writes a Double to an Address

bool Write(int iMemoryAddress, string sTextToWrite, int iMode = 0) //Writes a String to an Address. iMode explained below

bool Write(int iMemoryAddress, byte[] bBytesToWrite) //Writes a Byte Array to an Address

bool NOP(int iMemoryAddress, int iLength) //NOPs X Bytes at an Address



//Read from Pointer

byte ReadByte(int iMemoryAddress, int[] iOffsets) //Reads a Byte from a Pointer

ushort ReadShort(int iMemoryAddress, int[] iOffsets) //Reads a Short from a Pointer

uint ReadInt(int iMemoryAddress, int[] iOffsets) //Reads an Integer from a Pointer

long ReadLong(int iMemoryAddress, int[] iOffsets) //Reads a Long from a Pointer

float ReadFloat(int iMemoryAddress, int[] iOffsets) //Reads a Float from a Pointer

double ReadDouble(int iMemoryAddress, int[] iOffsets) //Reads a Double from a Pointer

string ReadString(int iMemoryAddress, int[] iOffsets, uint
iStringLength, int iMode = 0) //Reads a String from an Pointer. iMode
explained below

byte[] ReadAOB(int iMemoryAddress, int[] iOffsets, uint iBytesToRead) //Reads a Byte Array from a Pointer



//Write to Pointer

bool Write(int iMemoryAddress, int[] iOffsets, byte bByteToWrite) //Writes a Byte to a Pointer

bool Write(int iMemoryAddress, int[] iOffsets, short iShortToWrite) //Writes a Short to a Pointer

bool Write(int iMemoryAddress, int[] iOffsets, int iIntToWrite) //Writes an Integer to a Pointer

bool Write(int iMemoryAddress, int[] iOffsets, long iLongToWrite) //Writes a Long to a Pointer

bool Write(int iMemoryAddress, int[] iOffsets, float iFloatToWrite) //Writes a Float to a Pointer

bool Write(int iMemoryAddress, int[] iOffsets, double iDoubleToWrite) //Writes a Double to a Pointer

bool Write(int iMemoryAddress, int[] iOffsets, string sTextToWrite,
iMode = 0) //Writes a String to a Pointer. iMode explained below

bool Write(int iMemoryAddress, int[] iOffsets, byte[] bBytesToWrite) //Writes a Byte Array to a Pointer

bool NOP(int iMemoryAddress, int[] iOffsets, int iLength) //NOPs X Bytes (Pointer) //NOPs X Bytes at a Pointer



//Conversions

int Dec(int iHex) //Converts a Hexadecimal Value into Decimal

int Dec(string sHex) //Converts a Hexadecimal Value into Decimal

string Hex(int iDec) //Converts a Decimal Value into Hexadecimal

string Hex(string sDec) //Converts a Decimal Value into Hexadecimal



//Miscellaneous

bool BytesEqual(byte[] bBytes_1, byte[] bBytes_2) // Checks if two Byte Arrays are equivalent

bool IsNumeric(string sNumber) //Checks if Input String contains only Digits

byte[] ReverseBytes(byte[] bOriginalBytes) //Flips the Bytes in an Array. "AABBCCDD" becomes "DDCCBBAA"



//Creates a Static Address based on an Offset

int CalculateStaticAddress(string sStaticOffset) //Returns BaseAddress+StaticOffset

int CalculateStaticAddress(int iStaticOffset) //Returns BaseAddress+StaticOffset

int CalculateStaticAddress(string sStaticOffset, string sModuleName) //Returns ModuleBaseAddress+StaticOffset

int CalculateStaticAddress(int iStaticOffset, string sModuleName) //Returns ModuleBaseAddress+StaticOffset



Writing Types (ONLY IF NOT PRE-DECLARED):

    Byte: Prefix "(byte)"

    Short: Prefix "(short)"

    Int: Any non-float number will default to this type

    Long: Prefix "(long)" OR any number longer than an integer

    Float: Suffix "f"

    Double: Suffix "d" OR any number with a decimal

    Examples:
      Byte - "Write(iAddress, (byte)137);"

      Short - "Write(iAddress, (short)5000);"

      Integer - "Write(iAddress, 512591);"

      Long - "Write(iAddress, (long)125012);" or "Write(iAddress, 12357129572591);"

      Float - "Write(iAddress, 50.5f);"

      Double - "Write(iAddress, 920.512485d);" or "Write(iAddress, 125.125);"





The difference between iMode = 0 and iMode = 1:



Here's a picture, for reference:

C# Memory Library Reference



Alright, so say you read from the Address 52BD87. With iMode = 0, you get

Code:
Tuto

and with iMode = 1, you get

Code:
5475746F



So, basically, one Reads/Writes ASCII, and the other Reads/Writes literal Hex Bytes.



Here's a basic example for the Cheat Engine Tutorial (v3.1):

Note: This demonstrates Pointers. If the Static Address is not a pointer you would just ignore the Offsets Parameter.

A full trainer is provided on the Downloads Page. This is just for quick reference.

Code:
using MemoryEditor;



static void Main(string[] args)

{

Console.WriteLine("Please open Tutorial-i386.exe and press ENTER...");



Memory oMemory = new Memory(); //Create Memory Class

if (oMemory.OpenProcess("Tutorial-i386")) //Open Handle to Tutorial-i386.exe

{

Console.WriteLine("tPID: " + oMemory.PID());

Console.WriteLine("tSID: " + oMemory.SID());

http://Console.WriteLine("tFILE VERSION: " + oMemory.FileVersion());

Console.WriteLine("tSTART TIME: " + oMemory.StartTime());

Console.WriteLine("tBASE ADDRESS: 0x" + oMemory.Hex(oMemory.BaseAddress()) + "n");



oMemory.Write(0x57C310, new int[] { 0x458 }, (short)1000); //Completes Step 2



http://oMemory.Write(0x57C320, new int[] { 0x45C }, (short)5000); //Completes Step 3



http://oMemory.Write(0x57C340, new int[] { 0x46C }, 5000f); //Completes Step 4.1

http://oMemory.Write(0x57C340, new int[] { 0x470 }, 5000d); //Completes Step 4.2



http://oMemory.NOP(oMemory.CalculateStaticAddress(0x21DAA), 2); //Completes Step 5



http://oMemory.Write(0x57C370, new int[] { 0 }, (short)5000); //Completes Step 6



http://oMemory.Write(0x57C3A0, new int[] { 0xC, 0x14, 0, 0x18 }, (short)5000); //Completes Step 8

}

}



Update Log:

Code:
January 28, 2011: Added more overloads for simplicity.



January 26, 2011:

Some functions changed back to using overloads, as suggested by slovach

OpenProcess Import removed thanks to Wiccaan



January 24, 2011: Initial Release



Finally, if there are any questions, comments, concerns, suggestions,
helpful hints for others, bugs, or anything else, please either PM me or
post it here.

Your name will be included along with your contribution on this post!
EMO
EMO
EMO Team
EMO Team

Cinsiyet : Erkek
Burçlar : Yay
Yılan
Mesaj Sayısı : 184
Puan : 247393
Rep Puanı : 5
Doğum tarihi : 28/11/89
Kayıt tarihi : 18/05/11
Yaş : 34
Nerden : EMO world
İş/Hobiler : RCE Student / Game Hacking / Learn Beginner C#,C++,Delphi
Lakap : EMO

Sayfa başına dön Aşağa gitmek

Sayfa başına dön

- Similar topics

 
Bu forumun müsaadesi var:
Bu forumdaki mesajlara cevap veremezsiniz