1

I have created a python script that uses a database, which I have to pass in the file when compiling the .exe to a file. I would like to know if it is possible that the user to whom I give the file cannot edit the database (in a simple way)

enter image description here

I would like the file to be uneditable

2
  • Would you like to make the .db file uneditable ? Commented May 14, 2022 at 8:13
  • Yes, I would like that when distributing it it could not be edited Commented May 14, 2022 at 8:22

2 Answers 2

1

SQLite provides encryption functionality by itself. But it need some extra licence.

You can check the wiki: https://www.sqlite.org/see/doc/release/www/readme.wiki If you can protect the encryption key, you will be able to protect the db file. In the past, I've ever use the SEE integrated with sqlite. It's helpful in device application when shipping the app with data.

If you want to customize the encryption yourself, yes, you can check some opensource cryptography library to integrate it.

Sign up to request clarification or add additional context in comments.

1 Comment

Oh I had no idea about this, I think this will be my way forward, thanks a lot!
0

It would be possible to encrypt the file using a module like cryptography. But a determined attacker will always manage to find the encryption key in the executable (and this would probably cause some problems in the code)

To my knowledge, it is not possible to make a local file completely uneditable

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.