R
R
r1dddy4sv2021-03-24 11:36:26
Python
r1dddy4sv, 2021-03-24 11:36:26

How to store passwords in public code?

I faced this problem: I'm going to share the code with other users, but I don't want to burn codes from the database and the like

I also wanted to convert the code to exe for convenience
In general, ideally, convert python code to exe, so that the code itself there is no way to extract it, but as far as I know this is not possible (

I would be grateful for any information
Thank you!

Answer the question

In order to leave comments, you need to log in

4 answer(s)
P
pfg21, 2021-03-24
@pfg21

you can also extract the key from exe - there would be a need ...
before sharing the code with the public, replace the access keys to resources with xxxxxxxx
sed regexp and others like it to help
or take it to a module that is separate from the code exposed for access the public. you can add an example of this module without access keys to the code.

N
Nikita, 2021-03-24
@Nikobraz

use external authorization/keystore

V
Vladimir Kuts, 2021-03-24
@fox_12

Store passwords in environment variables

S
soremix, 2021-03-24
@SoreMix

passwords

in the public domain

It speaks for itself.
The answer is no.
You can make a server that will communicate with the database, it turns out that the password will not be explicitly laid down.
The application, instead of directly connecting to the database through credits, will make a request to your server, and the server is already accessing the database and returning the data that was requested, in accordance with the GET / POST parameters

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question