[Tutorial] Update memory hacking plugins
#41

I don't know memory adresses etc.

But does this means it's possible to do more things? Such as functions/callbacks?
Btw nice work!
Reply
#42

Quote:
Originally Posted by davve95
Посмотреть сообщение
I don't know memory adresses etc.

But does this means it's possible to do more things? Such as functions/callbacks?
Btw nice work!
No... This is basically just what you need to know to make memory hacking plugins work on new SA-MP releases.

Like YSF for example, it has to be updated with each SA-MP version. This tutorial shows you how to get the addresses you need to do so.
Reply
#43

Kurta999, I used your method of getting pRakServer. But it always points to zero.
Reply
#44

Get pNetGame, and use https://github.com/kurta999/YSF/blob...Structs.h#L734
or use offset pNetGame + 60 -> if im not wrong
Reply
#45

Quote:
Originally Posted by DRIFT_HUNTER
Посмотреть сообщение
Get pNetGame, and use https://github.com/kurta999/YSF/blob...Structs.h#L734
or use offset pNetGame + 60 -> if im not wrong
It's pNetGame + 64, because the very first member of the class is indexed at zero.
I have already tried, pRakServer = (CRakServer*)(*(void**)(pNetGame address + 64)). The server crashes when RPC is sent.

EDIT: Problem solved a silly mistake on my side.
Reply
#46

Kurta999, could you tell me short definition of what FindPattern does in YSF or another memory hacking plugin?,
I just know what if "\x00" then the mask is "?", else "x". I've tried ****** it but i don't know the keyword for that hehe .

AFAIK it is something like FindPattern(Pattern, mask), where i can get the address?
Reply
#47

FindPattern scans the opcodes and bytes of a certain function and returns the function address. Note that the opcodes or bytes must be a unique one, that is, you must find opcodes or bytes that does not match with the bytes of any other function. The thing, you see in the first parameter are the opcodes and bytes("\xE4\x90...") and the second parameter contains the mask. '?' Means that the opcode has a potential of getting changed after samp update, so FindPattern ignores it while scanning, opposite happens with 'x'.
Reply
#48

Could you tell me to how find opcodes or bytes in ida? (Something that inside first FindPattern parameter, ex: i want the opcodes and bytes for OnPlayerCommandText).
Reply
#49

Open IDA->Options->General->Disassembly Tab->Number of opcode bytes(set it to 8)->click on ok
...and that's it
Reply
#50

Wuih, finally, thanks codectile!
Reply
#51

Quote:
Originally Posted by RaeF
Посмотреть сообщение
Kurta999, could you tell me short definition of what FindPattern does in YSF or another memory hacking plugin?,
I just know what if "\x00" then the mask is "?", else "x". I've tried ****** it but i don't know the keyword for that hehe .

AFAIK it is something like FindPattern(Pattern, mask), where i can get the address?
http://forum.sa-mp.com/showthread.ph...82#post3063582


Quote:
Originally Posted by codectile
Посмотреть сообщение
Open IDA->Options->General->Disassembly Tab->Number of opcode bytes(set it to ->click on ok
...and that's it
I love you :3
Reply
#52

Quote:
Originally Posted by kurta999
Посмотреть сообщение
Love you too...
Reply
#53

BUMP!

Everybody who's wanna help porting plugins from 0.3.7 to 0.3.DL, let's try to understand this tutorial. I think it's not as that hard as it looks like, just use your head and logic. When I first upgraded YSF, I even didn't unsterstood totaly how function pointers works in C.
Reply
#54

Quote:
Originally Posted by kurta999
View Post
BUMP!

Everybody who's wanna help porting plugins from 0.3.7 to 0.3.DL, let's try to understand this tutorial. I think it's not as that hard as it looks like, just use your head and logic. When I first upgraded YSF, I even didn't unsterstood totaly how function pointers works in C.
will yu update this topic?
Reply
#55

This topic doesn't really needs to be updated, you can use the same pattern for 0.3.DL which described for 0.3.7.
Reply
#56

Someone should update SKY to 0.3DL and post a link for everyone since many were requesting but got ignored.

https://sampforum.blast.hk/showthread.php?tid=563442
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)