| View previous topic :: View next topic |
| Author |
Message |
od1exx How do I cheat?
Reputation: 0
Joined: 11 Nov 2010 Posts: 3
|
Posted: Thu Nov 11, 2010 2:48 pm Post subject: reading memory addresses in JAVA? |
|
|
hi everyone, i am new to the cheat engine yet i have a fairly strong grasp on most programming languages...
i'm not currently using cheat engine to hack a flash game however i am using to hack a similar flash app. the information in the flash app is easily accessible just by searching for text as all the info. i need is stored in XML.
basically i want to write a program (in java preferably, or c if need be) that searches for all instances of a string of xml and stores whatever information that follows into an array of objects that are then stored in a database. the parsing of the objects and storing in the db part are easily done by me, however actually pointing to the process in question and searching for the appropriate memory addresses is where i have a problem.
i was wondering if someone here could point me in the right direction given this situation.
|
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Thu Nov 11, 2010 3:15 pm Post subject: |
|
|
You probably don't want to do it in Java. You don't have access to the system API unless you use JNI which defeats the purpose of Java's cross-portability. I guess in this case you don't need it to be portable but I always think of JNI as a messy solution. You can do it in C by either injecting a DLL or using the system Read/WriteProcessMemory().
Actually I'm slightly confused as to your question. CE is a memory scanner. XML is a markup language and is usually stored in a file. Do you mean the XML is stored as a string in memory ?
Also what sort of database are you thinking of using ? Local SQLite database for example ? Or web server backend database ?
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
|
| Back to top |
|
 |
od1exx How do I cheat?
Reputation: 0
Joined: 11 Nov 2010 Posts: 3
|
Posted: Fri Nov 12, 2010 8:46 am Post subject: |
|
|
alright, i could go ahead and scrap using java if thats just the way it needs to be.
don't need cross-platform compatibility as it will only be me using this program and no one else.
and yes, XML is generally stored in a file but low and behold the XML i am trying to get a hold of is actually stored as a string in memory.
i'll be using a local sqlite most likely, or some type of local implementation, this is going to be a personal project so i do not need anything fancy, just whatever it'll take to get the job done.
so my pseudo code goes something like this:
-traverse to each spot in memory (XML) that corresponds to the beginning of a new object.
-read forward and parse the XML into an Object. the XML will be the same everytime and have the same tags so parsing should be easy.
-also it might be useful for me to store a pointer to memory where i found the XML for that Object so i can read it again from memory at a later date if anything changes...
-commit all Objects parsed from the XML into local database and then work with that.
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Fri Nov 12, 2010 10:08 am Post subject: |
|
|
C/C++ will be easier to do it in then Java (based on your two languages given).
Getting the Process:
FindWindow
GetWindowThreadProcessId
or
CreateToolhelp32Snapshot
Process32First
Process32Next
or
EnumProcesses (PSAPI)
Reading the memory:
OpenProcess
ReadProcessMemory
or
1. Use driver and use kernel layer API.
2. Inject a DLL and have direct access to the memory.
_________________
- Retired. |
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Fri Nov 12, 2010 12:03 pm Post subject: |
|
|
Lucky for you, Java and C++ are so very similar in syntax that you should be able to take your existing code almost line for line to make it work in C++
_________________
|
|
| Back to top |
|
 |
od1exx How do I cheat?
Reputation: 0
Joined: 11 Nov 2010 Posts: 3
|
Posted: Fri Nov 12, 2010 1:38 pm Post subject: |
|
|
ya i have extensive experience in both, so that is not the problem.
my real inexperience lies in assembly and, basically, the majority of cheat engine's functionality
now, basically this app is going to be storing information from auctions.
all info. related to the auction is stored in the XML that is in memory as a String. So i can find the current bid in this jumble of XML, the problem is that it doesn't seem to change when the current bid actually changes on the screen.
using my cheat engine skills (which are subpar ahah) i was able to find the mem. address that actually points to the current bid, and this DOES change as the bid changes on the screen. the problem with using that info. is that i am currently unable to distinguish which auction that points to (can't find a referencing id and my assembly skills aren't up to snuff to debug)
|
|
| Back to top |
|
 |
|