Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Programming
You last visited: Today at 04:05

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Writing to memory address

Discussion on Writing to memory address within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
ImmuneOne's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
Writing to memory address

Hey,

I'm trying to change my name in conquer by memory writing, but it isn't working.



Can someone tell me what's wrong about this;
Writing
Code:
                byte[] bytes = Encoding.ASCII.GetBytes(NewName);
                try
                {
                    int ID = System.Diagnostics.Process.GetProcessesByName("Conquer")[0].Id;
                    Console.WriteLine("[InfiniteCOHack] Process ID : " + ID + "");
                    Memory.WriteMem(ID, (IntPtr)Definitions.Adresses.Name, bytes);
                }
Memory address
Code:
            Name = 0x57b604,
Write function
Code:
        public static IntPtr WriteMem(int Proid, IntPtr BaseAddress, byte[] NewVal)
        {
            IntPtr ptr;
            WriteProcessMemory((IntPtr)Proid, BaseAddress, NewVal, (UIntPtr)NewVal.Length, out ptr);
            return ptr;
        }

        [DllImport("kernel32.dll")]
        private static extern bool WriteProcessMemory(IntPtr Process, IntPtr lpBaseAddress, byte[] lpBuffer, UIntPtr nSize, out IntPtr lpNumberOfBytesWritten);
And I guess 2548 isn't correct either.

Thanks for your time.
ImmuneOne is offline  
Old 01/31/2010, 15:51   #2
 
elite*gold: 20
Join Date: Aug 2007
Posts: 1,749
Received Thanks: 2,199
You have to pass the process HANDLE to the WriteProcessMemory function, not the process ID. If I remember correctly, the .NET Process class has a way of getting the process handle, but if not you can always use OpenProcess to get the process handle (google it).

I belive the way to get the process handle in .NET is something like (in your case):
Code:
int pHandle = System.Diagnostics.Process.GetProcessesByName("Conquer")[0].[COLOR="Black"][B]Handle[/B][/COLOR];
Also, the way your program is assuming that there's already a running instance of Conquer, that will probably give you some errors if there's no running Conquer.exe.
IAmHawtness is offline  
Old 01/31/2010, 16:03   #3
 
ImmuneOne's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
Quote:
Originally Posted by IAmHawtness View Post
You have to pass the process HANDLE to the WriteProcessMemory function, not the process ID. If I remember correctly, the .NET Process class has a way of getting the process handle, but if not you can always use OpenProcess to get the process handle (google it).

I belive the way to get the process handle in .NET is something like (in your case):
Code:
int pHandle = System.Diagnostics.Process.GetProcessesByName("Conquer")[0].[COLOR="Black"][B]Handle[/B][/COLOR];
Also, the way your program is assuming that there's already a running instance of Conquer, that will probably give you some errors if there's no running Conquer.exe.
Throws; Process ID 1340, and no changes.

Recent changes;

It throws random ID's like if I type; Idiot = 1344 and if I type IDIOT it shows 1348.
I used for OpenProcess the type 0x001F0FFF.
ImmuneOne is offline  
Old 01/31/2010, 20:34   #4
 
Nullable's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 390
Received Thanks: 321
Quote:
Originally Posted by ImmuneOne View Post
Throws; Process ID 1340, and no changes.

Recent changes;

It throws random ID's like if I type; Idiot = 1344 and if I type IDIOT it shows 1348.
I used for OpenProcess the type 0x001F0FFF.
Dude, you probably know that part, just to reassure
Code:
int bytes;
HANDLE hHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, ProcId);
int Result = WriteProcessMemory(hHandle, BaseAddr, Buffer, sizeof(Buffer), out bytes);
I don't get the idiot part though, explain?
Nullable is offline  
Old 02/19/2010, 06:11   #5
 
elite*gold: 0
Join Date: Sep 2006
Posts: 70
Received Thanks: 6
still need help??
redskull010101 is offline  
Reply


Similar Threads Similar Threads
[Source] Memory Reading / Writing SRO / VB6
07/07/2011 - SRO Hacks, Bots, Cheats & Exploits - 3 Replies
here is a simple source i made to show a buddy of mine how to call the read and write memory functions in vb6. right now it will call target / hp / mp ... you may want to update the offsets. this is a good example to show those out ther that want to learn. please if you use my code's give me credit /./
Memory Address
12/19/2007 - Conquer Online 2 - 0 Replies
Hello, I need help for making memory address's result based on what we need from MemAddr.ini. I.e: for C#/CSharp language:- // Declare the unmanaged functions. private static extern int GetPrivateProfileString(string lpAppName, string lpKeyName, string lpDefault, StringBuilder lpReturnedString, int nSize, string lpFileName);
Writing procedure to read mem address
02/08/2007 - Conquer Online 2 - 1 Replies
Basically iv been interested in writing a bot that has a few functions. But all of them resolve around reading conquers memory address. Problem is im not sure how to write the procedure to read it, when wrote them for other games i got the procedure from open source bots and well i dont see any here. So if someone could help me with writing the procedure.
memory reading and writing problem
08/11/2006 - Conquer Online 2 - 3 Replies
hello all, i learnt to use C++ recently and is trying to write my own little proggy to monitor values in game. Right now i came across a little problem. i can't make my program read the memory addresses. Can someone please tell me the code to reading memory addresses for their values and also the relevant header files to use. Additional info: the memory editor i used give me this type of address, eg : 000A09E4, 009207C8. 00BF0EE0 ... Pros please help. i really want to have a feel...



All times are GMT +1. The time now is 04:07.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.