Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 16:26

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

Advertisement



Getting info from Game Process Memory

Discussion on Getting info from Game Process Memory within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2005
Posts: 38
Received Thanks: 0
Any of you coders here could help me out?

From my program, I'm trying to retrieve/get the SERVER_NAME of the memory of the game. Ex, Conquer-online's Conquer.exe

ReadProcessMemory() could help, but still it confuses me.

Anybody can share detailed info about this?
RagnaBaby is offline  
Old 04/11/2006, 08:44   #2
 
elite*gold: 0
Join Date: Aug 2005
Posts: 443
Received Thanks: 72
u could use a sniffer to intercept the "connect" packets...there you will see the ip adress or hostname of the server the packets shall arrive
neji is offline  
Old 04/11/2006, 10:07   #3
 
elite*gold: 0
Join Date: May 2005
Posts: 4,620
Received Thanks: 104
Quote:
Originally posted by neji@Apr 11 2006, 08:44
u could use a sniffer to intercept the "connect" packets...there you will see the ip adress or hostname of the server the packets shall arrive
But to minimize the useage of not needed resources I wouldn't
use winsock, since It's probably not needed for his further actions.
I also would like to find a solution for this, since I have not much expirience
with memory editing.
Maybe It's Maybelline is offline  
Old 04/11/2006, 10:14   #4
 
elite*gold: 0
Join Date: Aug 2005
Posts: 443
Received Thanks: 72
@Ragna: what do you plan to do with this information?
neji is offline  
Old 04/11/2006, 11:26   #5
 
elite*gold: 0
Join Date: May 2005
Posts: 4,620
Received Thanks: 104
Probably if you go ingame there will be an offset showing the server's name, so perhaps he want to echo now the name in his programm or change it.
Maybe It's Maybelline is offline  
Old 04/12/2006, 11:09   #6
 
elite*gold: 0
Join Date: Apr 2005
Posts: 38
Received Thanks: 0
I'm just trying to retrieve the SERVER_NAME of which the game is connected. Sniffing doesnt work, all servers were connected on one ip address/port.

Finding the offset could be. But I still need more information in the whole process. Specially I'm trying to read a string of memory. I'm a lil bit experienced on C++. But not on this field yet.

More likely, on some tutorials, Injecting is what's done. Or even the others need that I'm the one who CreateProcess(). But I'm trying to do these from an already running app.

@neji: simply retrieve the servername, nothing else. More on learning stuffs.

Tnx
RagnaBaby is offline  
Old 04/12/2006, 16:55   #7
 
elite*gold: 0
Join Date: Aug 2005
Posts: 443
Received Thanks: 72
then ReadProcessMemory will do what you want

Quote:

The ReadProcessMemory function reads memory in a specified process. The entire area to be read must be accessible, or the operation fails.

BOOL ReadProcessMemory(

HANDLE hProcess, // handle of the process whose memory is read
LPCVOID lpBaseAddress, // address to start reading
LPVOID lpBuffer, // address of buffer to place read data
DWORD nSize, // number of bytes to read
LPDWORD lpNumberOfBytesRead // address of number of bytes read
);


Parameters

hProcess

Identifies an open handle of a process whose memory is read. The handle must have PROCESS_VM_READ access to the process.

lpBaseAddress

Points to the base address in the specified process to be read. Before any data transfer occurs, the system verifies that all data in the base address and memory of the specified size is accessible for read access. If this is the case, the function proceeds; otherwise, the function fails.

lpBuffer

Points to a buffer that receives the contents from the address space of the specified process.

nSize

Specifies the requested number of bytes to read from the specified process.

lpNumberOfBytesRead

Points to the actual number of bytes transferred into the specified buffer. If lpNumberOfBytesRead is NULL, the parameter is ignored.



Return Values

If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
The function fails if the requested read operation crosses into an area of the process that is inaccessible.

Remarks

ReadProcessMemory copies the data in the specified address range from the address space of the specified process into the specified buffer of the current process. Any process that has a handle with PROCESS_VM_READ access can call the function. The process whose address space is read is typically, but not necessarily, being debugged.
The entire area to be read must be accessible. If it is not, the function fails as noted previously.
msdn down , so I post the whole text instead of a link
neji is offline  
Old 04/13/2006, 06:15   #8
 
elite*gold: 0
Join Date: Apr 2005
Posts: 38
Received Thanks: 0
Ehe. As I said, I know about the ReadProcessMemory thing. Anyway, I've got it going already, thanks for your time.

I'm now more focused on getting the offsets, still trying to get used to this.

Again, Thanks alot
RagnaBaby is offline  
Old 04/13/2006, 22:02   #9
 
elite*gold: 0
Join Date: Aug 2005
Posts: 443
Received Thanks: 72
you can loop through memory using VirtualQueryEx. Then you can read out the allocated pages by using ReadProcessMemory and retrieve the adresses.
neji is offline  
Reply


Similar Threads Similar Threads
write memory process problem
10/28/2009 - General Coding - 3 Replies
Hey Leute Habe mir ebem mal das tut von Blackfog angeschaut. Verstehe es auch, bloss will mein compi nich so wie ich will XD habe es au scho mit copy and paste versucht, das ding macht einfach nix
Need a process/memory search tool
09/10/2008 - CO2 Programming - 1 Replies
Hi, I need a good program (full version ofcourse) for digging up the memory addresses to use in CO bots. Plz help. ty.
C# Write process memory
08/16/2008 - CO2 Programming - 6 Replies
ok so i have a question about how do i use the api function writeprocessmemory in C#, i already have readprocessmemory but i can't seem to get writeprocessmemory... so if anyone could show me the call and an example (preferably a pinball example) it would be very helpful :) heres what i have so far: //================================================ ==============================================// // Function: MemoryOpen(int ProcessID])) // ...
[Question] VB.Net and process memory
07/28/2008 - .NET Languages - 5 Replies
Hello, Im having some trouble with read/write process Memory and Im hoping someone here could help me out a little. Code: Dim iMoneyAddress As Integer iMoneyAddress = 90720324 Dim Reader As New MemReader.ProcessMemoryReader() Dim MyProcs As System.Diagnostics.Process() = System.Diagnostics.Process.GetProcessesByName(&quo t;Conquer")
Read Process memory in Conquer.exe
04/13/2006 - Conquer Online 2 - 6 Replies
Any of you coders here could help me out? From my program, I'm trying to retrieve/get the SERVER_NAME of the memory of the game. Ex, Conquer-online's Conquer.exe ReadProcessMemory() could help, but still it confuses me. Anybody can share detailed info about this?



All times are GMT +1. The time now is 16:26.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.