0

Ok hi guys ;) I’ll make it simple

I want to publish a project, python project and i want people to use it, BUT I don’t want them to read the source code or modify it, is there any way to do that? Encryption or something?

Thx for reading and have a nice day ;)

Shards-7
  • 23
  • 4
  • 2
    *is there any way to do that?* - no, not really – Marco Bonelli May 02 '22 at 15:10
  • 2
    If they can run it locally, they can read it (whatever encryption you use needs to be undoable to run it, and that means shipping the info necessary to decrypt it with the program). The best you can do is obfuscate it, or run it on a webserver where they're not the ones actually executing it. People ask this question *ALL THE TIME*, and it's a fool's errand. – ShadowRanger May 02 '22 at 15:11
  • 1
    Oh, that’s ok, thanks for giving me your time, keep it up – Shards-7 May 02 '22 at 15:11
  • 1
    @ShadowRanger oh, idk I don’t think that putting it on a web server and these type of things can work for me, for many reasons, BUT THANKS FOR YOUR TIME :l – Shards-7 May 02 '22 at 15:13
  • @SadCore: Yeah, if you can't run it for them, then you need to give them the tools needed to run it, and those tools, by definition, also expose the stuff they'd need to read/modify it. It won't necessarily be *easy* if it's well obfuscated, but it's rarely worth the effort (99% of users won't be competent to modify it even if you ship the unobfuscated original source code; obfuscation might get you down to 99.999%, but if there's enough of a motivation, someone will do it). – ShadowRanger May 02 '22 at 15:16

1 Answers1

1

I would recommend using pyarmor https://wiki.python.org/moin/Pyarmor#:~:text=Pyarmor%20is%20a%20command%20line,code%20of%20each%20code%20object.

For more information: https://github.com/dashingsoft/pyarmor https://pyarmor.readthedocs.io/en/latest/

Thornily
  • 533
  • 3
  • 15