1

For safety reasons, is there any way to protect flask app code?

I have tried to compile a .py into a .pyc, but the web app won't run.

I have also tried to use a python confuse tool, but the effect is not ideal.

Whether the flask application can be packaged by pyinstaller or cptyhon.

  • 1
    Can you provide more details? I expect that you mean you have a Flask app running on a live server, connected to the web. How are you hosting it? Is it on a Linux server running something like Apache or Nginx? – coralvanda Feb 14 '17 at 07:09
  • 1
    Basically no, its pretty trivial to decompile python bytecode. Set up the server properly to prevent serving your code. – reptilicus Feb 14 '17 at 20:00
  • The flask web app running environment : Linux + nginx + uWSGI + flask. – RegisteredUser Feb 15 '17 at 03:12
  • There are a lot of people have root privilege, what can I do is to find ways to prevent other people modify the code.Thank you very much!!! – RegisteredUser Feb 15 '17 at 03:24

0 Answers0