About 98,000 results
Open links in new tab
  1. How to obfuscate Python code effectively? - Stack Overflow

    Nuitka also compiles Python to native platform code providing a similar level of obfuscation like compiled C code. python -m pip install nuitka python -m nuitka --follow-imports --include-package urllib3.util.ssl_ myprogram.py ./myprogram.bin --follow-imports does a great job of including all imported modules.

  2. Python Code Obfuscation - Stack Overflow

    Feb 23, 2009 · py2exe or freeze are other solution, which convert the code into an executable. It just includes the code in the binary, and doesn't do any sort of serious obsfucation, but it's still harder than opening a .py file. You could write the code in Cython, which is similar to Python and writes Python extension files in C, for use as a .so.

  3. How do I protect Python code from being read by users?

    I've actually seen commercial python code shipped as embedded python inside of a C library. Instead of converting some parts of the code to C, they hide the entire python code inside a protective C layer. Then, if they want a module importable by python, they write a thin python extension on top of the C. Open source is a much easier way of life.

  4. python - Obfuscating tool for Python3 code - Stack Overflow

    Apr 2, 2015 · No matter what you do, at some point the Python interpreter is going to be reading in unobfuscated Python byte-code. From that it is dead easy to get back to your source code (minus comments and non-obvious layout). This is why everybody says it's pretty much impossible to obfuscate Python.

  5. obfuscation - Hiding Python Code from non-programmers - Stack …

    May 14, 2019 · Code Obfuscation; Generate byte code; There is two way to generate byte code. Command line ; Using python program; If you are using command line use python -m compileall <argument> to compile python code to python binary code. Ex: python -m compileall -x ./* Or, You can use this code to compile your library into byte-code.

  6. obfuscation - How to secure python code in client production ...

    Aug 1, 2023 · Python (nor any language) is not an interpreted language. The most common implementation, CPython, is both a compiler (of Python source code to a custom byte code) and a virtual machine (which executes the byte code). You should be able to deploy just pre-compiled .pyc files to be executed, which at least counts as some form of obfuscation. –

  7. How to obfuscate python code to be compiled to an executeable?

    I have been distributing my python scripts as Pyinstaller compiled executeables so that people can't steal my code, but I found that there are many tools like this which can easily decompile executeables generated by Pyinstaller. Is there any way to obfuscate this code.

  8. Hiding a password in a python script (insecure obfuscation only)

    May 1, 2017 · Create a python module - let's call it peekaboo.py. In peekaboo.py, include both the password and any code needing that password; Create a compiled version - peekaboo.pyc - by importing this module (via python commandline, etc...). Now, delete peekaboo.py. You can now happily import peekaboo relying only on peekaboo.pyc.

  9. Python efficient obfuscation of string - Stack Overflow

    Sep 20, 2011 · Once the algorithm is known the "slow down" effect immediately drops to zero. Bank vaults with known combinations are as useless as screen doors with simple hooks to keep the closed in the wind. Same with this "obfuscation". Once the obfuscation is known, the slow-down drops immediately to zero. –

  10. obfuscation - how to encrypt python source code? - Stack Overflow

    Jul 5, 2011 · Obfuscation is hard; Other means to achieve your goals; Firstly, Python was not designed to be obfuscated. Every aspect of the language is free and accessible to anybody who wants to inspect or modify it. Being a bytecode language makes it difficult to lock down, and Python bytecode is easy to understand.

Refresh