AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Module Coding (https://forums.alliedmods.net/forumdisplay.php?f=9)
-   -   Module: MemHack (https://forums.alliedmods.net/showthread.php?t=23152)

Twilight Suzuka 01-11-2006 22:40

Module: MemHack
 
2 Attachment(s)
MemHack <short for Memory Hacking Module> allows you to hack any part of the memory dynamically using simple functions.

You may hack the mod dll, to directly alter and interface with the mod.
You may also hack the engine dll, and directly interface with that, allowing you to do things even mods can't do.
You can also hack freeform, with no base address.

Allows for simple retreival and patching of memory, as well as a few helper functions. Note: You can, and probably will, crash HL1 with this. Be careful.

This module can emulate any CSHACK native.

To add:
Hooking and calling functions

Credit to: DS for his awsome code. You asked for someone to clean up the code; I did ^^

PM 01-12-2006 08:32

Re: MemHack
 
Quote:

Originally Posted by Twilight Suzuka
You may also hack the engine dll, and directly interface with that, allowing you to do things even mods can't do

Any particular reason for that? I can't believe that mods couldn't hack the engine dll :o

Also, watch out with this - you could easily crash the server; and things like modifying code will break on PAX.

Twilight Suzuka 01-12-2006 10:44

Re: MemHack
 
Quote:

Originally Posted by PM
Quote:

Originally Posted by Twilight Suzuka
You may also hack the engine dll, and directly interface with that, allowing you to do things even mods can't do

Any particular reason for that? I can't believe that mods couldn't hack the engine dll :o

Also, watch out with this - you could easily crash the server; and things like modifying code will break on PAX.

I never saw any method of altering the game .dll from the mod, without using the same method of memory patching, which is what I emant ^^ No native method; you have to use crazy hacks.

When I add function hacking, this module will become evn more:
unstable
hard to use
functional.

Twilight Suzuka 01-13-2006 20:17

Updated to fix some bugs.

More 01-29-2006 10:46

gj

Twilight Suzuka 01-29-2006 12:48

Thanks.

Blackhawk 02-08-2006 17:37

Are there any documentation or samples that someone can use?
Would like to test that brand new stuff :)

Twilight Suzuka 02-08-2006 18:25

Not exactly. See, the effort required to find the nessasary offsets just isn't worth it ^^;

Blackhawk 02-08-2006 19:47

Ok, lets pratice a little with me please :)

Lets say, my mod has loaded it's base at 01050000. As far i have understood, MEM_DLLBASE should be the right value for me without bothering where the real address is.

At Address 0127B4E8:134 is a pointer to a float value i would like to change.
Give me a hint how the code must look alike, every try i did ended in a server crash :(

Twilight Suzuka 02-08-2006 20:39

Where the pointer is doesn't matter; what matters is its offset from base ^^


All times are GMT -4. The time now is 02:31.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.