View previous topic :: View next topic |
Author |
Message |
johnkittz Advanced Cheater Reputation: 0
Joined: 17 May 2016 Posts: 95 Location: orderandhacks
|
Posted: Thu Nov 24, 2016 2:15 pm Post subject: [HELP] Check Game Version and Work on multiple versions |
|
|
I'm needing some help on how to make a trainer work for multiple versions of a game
Example:
Trainer will check the game version then return the correct cheat table for said version
I don't know if this possible YET, but I would like to know
_________________
Another Day, Another Hack. |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Thu Nov 24, 2016 2:24 pm Post subject: |
|
|
I find that
Code: |
md5memory(process,4096)
|
returns a unique identifier different for each version
alternatively if the exe has version information, you could try
Code: |
getFileVersion(enumModules()[1].PathToFile)
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
atom0s Moderator Reputation: 198
Joined: 25 Jan 2006 Posts: 8516 Location: 127.0.0.1
|
Posted: Thu Nov 24, 2016 4:11 pm Post subject: |
|
|
Use AOBs to scan for the needed pointers and offsets that you need per-version. You can avoid needing any version check then simply by relying on the patterns entirely.
_________________
- Retired. |
|
Back to top |
|
|
paul44 Expert Cheater Reputation: 2
Joined: 20 Jul 2017 Posts: 152
|
Posted: Thu Nov 30, 2017 1:34 pm Post subject: |
|
|
I ran into an issue when trying out this function. See images here: [ imgur_com/a/TELDU ].
2 things:
1. when I comment out the 'MD5value=...' line, then press Execute, then "enable" the line again... it works fine?!
2. when I run this several times (after restarting CE and/or game), I get different MD5 values?!
ps: getFileVersion() works well (see here: [ forum_cheatengine_org/viewtopic.php?p=5694978#5694978 ]), but sometimes games do not provide file_info...
|
|
Back to top |
|
|
paul44 Expert Cheater Reputation: 2
Joined: 20 Jul 2017 Posts: 152
|
Posted: Sun Jan 28, 2018 5:22 am Post subject: Shadow Of Mordor MD5 header... |
|
|
To come back to the issue of changing MD5 values:
- did some recent tests with AC I (Dx9 & 10): works as expected (=> MD5 digest)
- AC Brotherhood: sha1 digest (not "working")
- Shadow of Morder (x64): keeps changing per game startup?
(even tried to lower header size: 2048 - 1024 ~ same problem) => no Dig Sign tab !
- Shadow of War (x64): works as expected... => sha1 digest
Anyone has an idea why this happens for SoM in particular?
-UPDATE- see my post below...
Last edited by paul44 on Tue Jan 30, 2018 3:53 am; edited 1 time in total |
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Sun Jan 28, 2018 5:39 am Post subject: |
|
|
I tend to go in the direction that atom0s suggested. But instead of "89 83 80 04 00 00" I opt for "8Dxxxx8Bxxxxxxxxxx29xx89xxxxxxxxxx8DxxxxE8xxxxxxxx8Bxxxx8BxxxxxxxxxxE8xxxxxxxx83" because if it always has to do some operations around what I want to hook, then the main instructions should stay the same. Then I use "readMem" and/or "reassemble" as needed, and I like using "assert" to limit debugging crashes. Most of the time the AOBs still work but the "assert"s fail and I just cut these out if it gets handled with "readMem" or "reassemble".
Some times a little Lua to pull some offsets to use later is AA scripts is also needed. But most of the time finding a good spot to change a registry combined with "readMem" or "reassemble" do the job.
_________________
|
|
Back to top |
|
|
paul44 Expert Cheater Reputation: 2
Joined: 20 Jul 2017 Posts: 152
|
Posted: Tue Jan 30, 2018 3:50 am Post subject: Digital Signatures... |
|
|
I think I figured it out. When one checks the Exe properties, there is - in most cases - a 'Digital Signatures' tab (something I never looked at till now). When it shows a 'md5 digest', everything seems to be peachy. If it shows a 'sha1 digest' (or no tab at all), then you have more chance of receiving a different value with each launch...
I'll be looking at MS Signtool later this week, to see if I can make more sense out of this...
ps: I have no idea how the lua MD5 function works (whether it calculates the PE header in memory - most likely since one can define the memory size - or actually collects the aforementioned signature)...?
@TheyCallMeTim13:
In short: like you said. ('see my response in the other General Discussion post')
|
|
Back to top |
|
|
|