Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest to apply cython #23

Open
koolay opened this issue Nov 24, 2017 · 3 comments
Open

Suggest to apply cython #23

koolay opened this issue Nov 24, 2017 · 3 comments

Comments

@koolay
Copy link

koolay commented Nov 24, 2017

    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?

@Falldog
Copy link
Owner

Falldog commented Nov 25, 2017

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

  1. modify pyconcrte execution for only execute your entry main pye only.
    => But, can be hack by gdb attach
  2. modify python BYTE CODE rule, but you need to modify and compile python by source
  3. the more you can do, reference Looking inside the Dropbox

@koolay
Copy link
Author

koolay commented Nov 27, 2017

Is possible compile the python module pyconcrete use cython?

@Falldog
Copy link
Owner

Falldog commented Nov 27, 2017

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

@Falldog Falldog changed the title Question Suggest to apply cython May 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants