How can I protect the Python code of a program from decompilation?

AtomSMM

Junior Member
Joined
Feb 18, 2024
Messages
140
Reaction score
46
Hi!

Let's say I'm developing a Python program and I want to distribute it to users, but at the same time make sure that the program code remains inaccessible. I understand that Python is an interpreted language, and even if I use obfuscators or compile a program through pyinstaller, theoretically it can still be decompiled.

Question: how realistic is it to fully protect the code from decompilation?
 
It is never possible to fully protect the code from reverse engineers! You only can make it harder for a reverse engineer by obfuscating the code.

Packers can be used to obfuscate it further. I know for C binaries UPX is used, maybe there is something for python binaries (unlikely though as python is not made for compilation).
Maybe put your code on a server and only accessible by an API
 
Back
Top