| View previous topic :: View next topic |
| Author |
Message |
fearless123456 How do I cheat?
Reputation: 0
Joined: 13 Nov 2017 Posts: 5
|
Posted: Tue Sep 17, 2019 6:03 am Post subject: How to get the address of an instanced class? |
|
|
I would like to invoke a mono method using AA. So instead clicking on dissect mono and find instances of class every time, I would like to implement something like the code below but without having to using an arbitrary value for the address variable (which doesn't work after resetting the game anyway). Just note that I know next to nothing about lua. Thank you.
[code]
[enable]
{$lua}
if (syntaxcheck) then return end
local method = mono_findMethod('', 'CCheatsScreen', 'Toggle')
local class = mono_method_getClass(method)
local domain = mono_enumDomains()[1]
local address = 0x1BA15340
local args = {}
local r = mono_invoke_method(domain, method, address, args)
if r then
print(r)
end
{$asm}
[disable]
[/code]
|
|
| Back to top |
|
 |
Csimbi I post too much
Reputation: 97
Joined: 14 Jul 2007 Posts: 3328
|
Posted: Tue Sep 17, 2019 2:59 pm Post subject: |
|
|
I usually find a place where the object is frequently accessed (not too frequently though and only the object I want).
Then, I use an AA script with and AOB scan to tap into the code where I register a pointer and expose the pointer in the address list.
This is without using any LUA.
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25819 Location: The netherlands
|
Posted: Wed Sep 18, 2019 1:31 am Post subject: |
|
|
You can use the mono functions to get the vtable value of the class and then scan the memory for that
Then on every result check if the fields contain valid values according to the fieldtype etc...
And then pick the one you believe is the best match (there can be multiple, like if you died and a new player got created, but the old player hasn't been overwritten with crap)
_________________
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 |
|
 |
t328163 !BEWARE! Deletes post on answer
Reputation: 2
Joined: 19 Dec 2017 Posts: 73
|
Posted: Wed Sep 18, 2019 3:22 am Post subject: |
|
|
ask the computer "what is the memory addr of this class?"
|
|
| Back to top |
|
 |
Csimbi I post too much
Reputation: 97
Joined: 14 Jul 2007 Posts: 3328
|
Posted: Wed Sep 18, 2019 6:16 am Post subject: |
|
|
| t328163 wrote: | ask the computer "what is the memory addr of this class?"  |
I am curious what would Cocktanya say to that question.
Did you try?
|
|
| Back to top |
|
 |
|