Thanks, Thanks, Thanks,Thanks, Thanks, Thanks,Thanks, Thanks, Thanks,....... ^^
|
1 Attachment(s)
Tell me if this one fixes the problem:
|
Jepp, works correctly. :D
Where was it? Where did you found my cute little bug? |
I messed up the writing protocals. My bad ^^
So, wanna make me an example plugin? ^^ |
Yay, example plugin!
Now i can use this to mess width startmoney and bombtimer instead of cshack :twisted: |
If I'll do an example plugin,it won't be for CS - im a Natural Selection Server admin only ^^
Twilight, another question: Do i need to mess around with the Base Adresses? Or is MEm_DLLBASE the only thing i need to define? 2nd, how is memhack_get_base used? 4rd How memhack_get_realaddr? And thank you again for your continued support! |
MemHack was not originally written to be an AMXx module. It was repurposed for AMXx use.
As such, there are some features you will almost never find a use for. MEM_DLLBASE allows mod .dll hacking. MEM_ENGBASE allows HL1 engine hacking. MEM_NULLBASE allows for total memory hacking. These two natives are only useful for total memory hacking: Code:
native memhack_get_base(func_addr,&success); In order to hack the memory of a program, you need its base address. Then you can hack offsets of the base address. This native lets you do that. memhack_get_realaddr isn't useful at all really; all it does is return the current full address of the memory at this offset. When hacking programs, we use offsets from base; this will return the actual address, instead of the partial offset we give it. The only true use of this native is that we can get the actual address of the base. The real address of an offset - the offset = the address of the base address. Using these natives, one could concievably hack any programs in the memory, or even create ones own program, or inject one program into another. However, no one will ever use these natives, or have a need to, besides debugging ^^ |
Then we have maybe anoter bug in this module.....
Ok, i'll show what i think: The Editor shows the base of the MOD dll running at Hex 01050000 The pointer to the value in question is now at Hex 0127B4E8 +134 So the offset should be Hex(127B4E8 +134 -01050000), giving Hex 22B4E8 or decimal 2274844. Now it apears the the code below actually works, and the code that should work crashes the server. Code:
On the other hand, this returns 0: Code:
So it looks like MEM_DLLBASE, MEM_CODEBASE etc are not accounted correctly, because in this line Code:
I hope you get my point. |
In order for getbase to work, you need the pointer of a valid function. I don't think you have the pointer of a valid function. ^^
ENG was also added as an afterthought, and never tested extensively, though it did return a different full address, so I assumed it worked. In addition, all calculations should be done in hex, for standardization. |
19379432 is 127B4E8 and that is correct, whatsoever when the dllbase is 01050000, this code example shouldn't work if MEM_DLLBASE would be valid.
127B4E8 is the exact adress WITH DLLBASE. If i understand it right, Code:
But this sample works! :shock: |
All times are GMT -4. The time now is 13:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.