DEV Community

Adolfo
Adolfo

Posted on

Help with python3 to open an executable already in memory

Hello, I want to create a code in which my script opens an executable where I left its binary code encrypted in base64 inside a variable that is in the script's source code
But it's simple, just decrypt base64 to get the binary code and save that binary code in some .exe file somewhere and open it, that's it :)
But that's not how I need it, I need it to open this executable already in memory without saving anywhere, example code:

from base64 import b64decode
executable_base64 = b"""dGVzdGU=......"""" #Just an example, but it's much bigger than that
executable_binary = b64decode(executavel_base64)

Here would open the code of the executable_binary variable already in memory


The libraries I tried to use were win32pipe,win32file, but without success

Top comments (0)