Discuss Find out allocated address for my programm in the C Programming forum on Dev Shed. Find out allocated address for my programm C programming forum discussing all C derivatives, including C#, C++, Object-C, and even plain old vanilla C. These languages are low level languages, and used on projects such as device drivers, compilers, and even whole computer operating systems.
Location: Woodland Hills, Los Angeles County, California, USA
Posts: 9,401
Time spent in forums: 2 Months 8 h 41 m 14 sec
Reputation Power: 4080
You're not understanding the reply very well. You can do this in C, but the way to do it is dependent on the OS. What this means is that the function calls to do this depend on which OS you're running on.
Therefore, if you intend to write a memory scanner in Windows, it is useful to mention that you are using Windows and which C compiler you are using as well.
__________________ Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
Posts: 120
Time spent in forums: 3 Days 19 h 7 m 57 sec
Reputation Power: 44
Declare a MEMORY_BASIC_INFORMATION structure. Next call OPEN_PROCESS using the process ID of the target application. Call GetSystemInformation to get min and max application address range. Now loop thru the application address range and call VirtualQueryEX to load the Memory_BASIC_INFORMATION structure. Check the MBI struct for memory type of MEM_PRIVATE *AND* MEM_COMMIT. Allocate heap space needed for the ReadProcessMemory to read a region size of application memory. Keep looping by region size to iterate thru application memory.
Unfortunately, I'm a newbie on this forum, so, I can't post links to all the required function calls etc.
Posts: 8
Time spent in forums: 1 h 37 m 57 sec
Reputation Power: 0
Thank u for the first actual helping reply, i know how to read/write into process memory(mean i also know how to open),
ok i'll just need help about the part of finding the range of addresses i'll p.m u
edit : i actually cant send p.m
Posts: 3,903
Time spent in forums: 2 Months 3 Weeks 4 Days 7 m 35 sec
Reputation Power: 1774
> Thank u for the first actual helping reply,
Well it's your own damn fault for taking 8 hours to post relevant information that would enable ANYONE to post anything like a decent guess as to what you might want.
Posts: 2,507
Time spent in forums: 1 Month 2 Weeks 2 Days 22 h 14 m
Reputation Power: 2274
Quote:
Originally Posted by salem
> Thank u for the first actual helping reply,
Well it's your own damn fault for taking 8 hours to post relevant information that would enable ANYONE to post anything like a decent guess as to what you might want.
Which of course is script kiddie "help me cheat on a game" assistance.
__________________
I ♥ ManiacDan & requinix
This is a sig, and not necessarily a comment on the OP: Please don't be a help vampire!
Posts: 8
Time spent in forums: 1 h 37 m 57 sec
Reputation Power: 0
Quote:
Originally Posted by BobS0327
No problem. I never respond to PMs for any type of assistance. Prefer to do everything in the open forums.
So, what do you not understand about finding the range of a program's address space?
Well i finally build it just 1 problem, i dont get current address...
the address i get is very close to base, mean i cant get full address... i can get :
0001C700
but not the addresses i want like 0034FD90
code :
http://pastebin.com/G7tiaVgf
Posts: 4,824
Time spent in forums: 1 Month 2 Days 21 h 1 m
Reputation Power: 1800
Quote:
Originally Posted by BotHelp
Well i finally build it just 1 problem, i dont get current address...
the address i get is very close to base, mean i cant get full address... i can get :
0001C700
but not the addresses i want like 0034FD90
code :
http://pastebin.com/G7tiaVgf
What is wrong with pasting the code here!? Your code recovered from the bin:
Posts: 120
Time spent in forums: 3 Days 19 h 7 m 57 sec
Reputation Power: 44
I somewhat modified your code to keep you going in the right direction. I can't post the complete solution since you should be learning by writing the code. You still have to write additional code to complete this task.
Posts: 8
Time spent in forums: 1 h 37 m 57 sec
Reputation Power: 0
u pretty much didnt done anything... u added a term if the minumum address is lower the then maximum, what is always true. is the same as put true inside, i can add a term that if the address is readable, but it doesnt realy matter the fact that i cant print my wanted address
Posts: 149
Time spent in forums: 3 Days 12 h 1 m 16 sec
Reputation Power: 35
Quote:
Originally Posted by BotHelp
u pretty much didnt done anything...uYou added a term if the minumum address is lower the then maximum, whatwhich is always true. isIsn't it the same as putting true inside? Perhaps you're suggesting that there is some algorithm I should be using for which this isn't the case to start with? Thanks for taking the time to help me with my problem.