pyconcrete
pyconcrete copied to clipboard
Suggest to apply cython
def load_module(self, fullname):
if fullname in sys.modules: # skip reload by now ...
return sys.modules[fullname]
data = decrypt_buffer(self.data) # decrypt pye
print('----------------------------')
print(data) #### plaintext
print('-------------------------------')
Since result of decrypt_buffer is plain, we can reverse the whole source code?
Unfortunately ... Yes,
If there is someone try to hack your python code, there is lots way to decrypt .pye to plain text.
pyconcrete provide the easy way to encrypt code, but it's not safe enough for the senior python programmer.
If you want to find the more safe encryption way for python, maybe pyconcrete is not the choice.
The other options may be below
- modify
pyconcrteexecution for only execute your entry main pye only. => But, can be hack by gdb attach - modify python BYTE CODE rule, but you need to modify and compile python by source
- the more you can do, reference Looking inside the Dropbox
Is possible compile the python module pyconcrete use cython?
cython is a good idea.
But there is still a way to patch load_module() in runtime.
Build by cython will make user hard to dump it, because user need to do more thing to hack it.
BTW, decrypt_buffer() return value, it should be plaintext as .pyc content. It's not the source of .py