I have a software with an embedded python interpreter. The software can open upon startup a given .py script and execute it. Let's assume that in my python environment I can't open other files, and I can't use external tools like Cython
I want to obfuscate the script. My only demand is that the payload part of the file (my custom business logic) could not be opened in a text editor and plain-text read.
I could imagine the flow of the script will be de-obfuscation/decryption of a payload, that resides within the .py file as the first step and then executing it.
I can store within the script any encryption key, and I don't care that the decryption part will be visible and that it can be easily reproduced.
Any ideas how can I make that happen?