D
D
Denis Verbin2015-05-24 16:44:50
Python
Denis Verbin, 2015-05-24 16:44:50

How to compile python so that it can't be decompiled?

How to compile a python script so that its contents cannot be pulled out by a decompiler?
In particular, it is necessary to protect not the code itself, but a small section of it, the password to the database :)

Answer the question

In order to leave comments, you need to log in

4 answer(s)
O
OnYourLips, 2015-05-24
@OnYourLips

No way.

I
Ilya, 2015-05-24
@FireGM

If the database is located locally, then it does not make sense. And if to a remote database, then you need to do the right server api. And there is always a possibility to decompile.

S
Stanislav Fateev, 2015-05-24
@svfat

If you just hide the password from prying eyes, which is stored in clear text, then you can use base64 encoding:

pass = 'password'
encoded_password = pass.encode('base64')
print encoded_password
decoded_password = encoded_password('base64')
print decoded_password

But this, of course, is a very primitive defense (no matter what you peep over your shoulder).
It would be more correct to put the password in a separate file and read from it.

A
Alexander Taratin, 2015-05-24
@Taraflex

https://www.google.ru/webhp?sourceid=chrome-instan...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question