AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   SM msvcrt exports (https://forums.alliedmods.net/showthread.php?t=340347)

NotnHeavy 11-12-2022 11:49

SM msvcrt exports
 
SM msvcrt exports

Remember this post a user made a while back, demonstrating how you can get an executable's PEB? Well, inspiration tends to be pretty wild.

I wrote my own SourcePawn include that walks over the export table of the loaded msvcrt.dll module, grabs the RVAs of a bunch of stdlib.h functions (such as malloc and free), then sets up SDKCalls for them. Why? Why not, I thought this would be fun. It allowed me to learn a few things on the way as well.

If I ever get bored, I may write a Linux version of this as well. Feel free to bug me over it I suppose. :)

Go wild with this! For serious work however, I would advice towards using an extension instead.

GitHub repository
cstdlib.inc in GitHub repository

Dragokas 12-01-2022 05:30

Re: SM msvcrt exports
 
Cool. Good work.

Just FYI, there is MemoryEx include, doing the same for both Windows and Linux.
BTW, unlike Windows, there is no symbol information in elf libs loaded module. Such info could be extracted from physical file only. I described more detail information here.

NotnHeavy 12-01-2022 12:23

Re: SM msvcrt exports
 
That's actually pretty interesting! Thank you for sharing, I didn't realize this existed haha.


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

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