ReadProcessMemory()

Page 1 of 1

7 Replies - 309 Views - Last Post: 09 January 2013 - 01:23 PM Rate Topic: -----

#1 Cloaked9000  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 52
  • Joined: 13-August 11

ReadProcessMemory()

Posted 09 January 2013 - 12:02 PM

Hello, I've wanted to read another programs variables by using their memory address. In a tutorial I read it only demonstrated how to read a programs memory by creating an unsigned int with the address value. Like:
DWORD Test = 0x72G7H...
How would I create the variable earlier on
DWORD Test
without assigning a value to it, then later asking the user to input what Test should contain. Although integers will not hold letters when entered. How can I do this?
Oh, and what I'm using looks like this:
ReadProcessMemory(phandle,(void*)address,&value,sizeof(value),0)


Is This A Good Question/Topic? 0
  • +

Replies To: ReadProcessMemory()

#2 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3552
  • View blog
  • Posts: 11,009
  • Joined: 05-May 12

Re: ReadProcessMemory()

Posted 09 January 2013 - 12:08 PM

You should have learned very early in your C or C++ programming career that you simply declare a variable like:
int x;



What book are you using to learn C/C++ that they completely glossed over this?
Was This Post Helpful? 0
  • +
  • -

#3 Cloaked9000  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 52
  • Joined: 13-August 11

Re: ReadProcessMemory()

Posted 09 January 2013 - 12:12 PM

...
I'm not trying to declare an integer with a value, i'm trying to ReadProcessMemory() using an interger, basically. But intergers do not hold letters unless you do something like this in your code
cin >> Interger
But you cannot enter letters into that.
You can use:
int Interger = 0xH7e...
But that's not what I want to do. I want to give it that value later on depending on user input.
Was This Post Helpful? 0
  • +
  • -

#4 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3552
  • View blog
  • Posts: 11,009
  • Joined: 05-May 12

Re: ReadProcessMemory()

Posted 09 January 2013 - 12:34 PM

You can have the user input a hexadecimal string, and then convert the hexadecimal to binary conversion.

I am deliberately being cagey about my responses to this thread because I feel that you are using ReadProcessMemory() for malicious purposes.
Was This Post Helpful? -1
  • +
  • -

#5 Cloaked9000  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 52
  • Joined: 13-August 11

Re: ReadProcessMemory()

Posted 09 January 2013 - 12:38 PM

Ah ok, I'm reading the players health in minecraft, i've created a kind of miner bot, but there's issues with lava... so I wanted the program to detect if the health was decreasing and then quit the game, everything works fine but the variable location changes every time minecraft is opened, so I wanted the user to be able to use cheat engine to manually find the variable ID and enter it into the program instead of having to look at the source and recompile it.
Was This Post Helpful? 0
  • +
  • -

#6 Cloaked9000  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 52
  • Joined: 13-August 11

Re: ReadProcessMemory()

Posted 09 January 2013 - 12:43 PM

How exactly would I do this?
Was This Post Helpful? 0
  • +
  • -

#7 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3552
  • View blog
  • Posts: 11,009
  • Joined: 05-May 12

Re: ReadProcessMemory()

Posted 09 January 2013 - 01:17 PM

You could just have the user enter an address in decimal instead of hexadecimal and you won't have to worry about it in your program.

This is the last post I'll make on this thread before I close it. In general, DIC does not help writing of game cheats, bots, and malware.
Was This Post Helpful? 1
  • +
  • -

#8 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9094
  • View blog
  • Posts: 34,148
  • Joined: 12-June 08

Re: ReadProcessMemory()

Posted 09 January 2013 - 01:23 PM

After the lock:


Agreed - we do not support cheats or hacks here. Do not persist this line of questioning here. If you have questions shoot me a pm.
Was This Post Helpful? -1
  • +
  • -

Page 1 of 1