Executing outstanding .dll functions with python

This may seem like a strange question, but I would like to know how I can run the function in the .dll from the "signature" of the memory. I do not really understand how this works, but it was very bad for me. Its a way to deal with outstanding functions from a .dll if you know the signature and memory address. For example, I have the following data:

respawn_f "_ZN9CCSPlayer12RoundRespawnEv"
respawn_sig "568BF18B06FF90B80400008B86E80D00"
respawn_mask "xxxxx?xxx??xxxx?"

And using pretty pretty C ++ code, you can use it to run functions from .dll.

Here is a well-explained article about it: http://wiki.alliedmods.net/Signature_Scanning

So, is it possible to use Ctypes or any other way to do this inside python?

+5
source share
2

++, SWIG python ++, python.

http://www.swig.org/

, SWIG:

Swig , . Python (int) , cpp "int", swig . .

Swig , , cxx .

, .

+2

, , ; , Python. , .

, ctypes. Python, getattr().

, , , , , . dumpbin.exe, Windows. , , MS LinK.exe, .

( " ", ), - :

ctypes func = getattr (ctypes.windll.msvcrt, "@@myfunc" ) retval = func (None)

, "msvcrt" DLL, .

, , - , , , , . , AND VERSION ++, DLL.

, stdcall, , . cdecl, . , , , .

0

All Articles