DEV Community

Cover image for Make a password manager with python: Making the basic mechanisms

Make a password manager with python: Making the basic mechanisms

Muhimen on March 25, 2020

Every password manager must save the password a user gives and output it when the user needs it. We are gonna apply the same thing to our password ...
Collapse
 
banajitrajbongshi profile image
Banajitrajbongshi

thanks Sir , I can be able to easily understand the basics.
But my question how can I use these database to use in log in programme?
please help me Sir

Collapse
 
muhimen123 profile image
Muhimen

First of all I am not a sir(it makes me uncomfortable πŸ˜…).

Secondly, sorry because I didn't continued the series for some reasons.

Finally, to answer your question, use selenium. It's a python web automation framework. I would take the login data and then input them in a website using selenium.

Collapse
 
emperor profile image
King

Well you can use MySQL, SQLite or PostgreSQL as these are the common ones. You can check their functioning on google or watch a video on YouTube. As for log in programmer, you can also do it without a database.
user_name and password are two variables. When you enter a value in them you can create a file with the name {user_name}.{password}.txt. So basically you are opening the file where your passwords are save and your file name is your username.password

Collapse
 
0x4a0x410x4b profile image
0x4A-0x41-0x4B

This is a terrible idea.

Learning the basics of python (or anything for that matter) is a good thing, but you seem to start at the wrong end. Password Managers are not used to just store passwords, they are used to store them encrypted and save, they are supposed to save yourself from using the same password for everything. Nothing can be learned by reading your 3 articles on the topic. Bad practices such as not using context managers or the use of CamelCase (These two are not terrible but when trying to teach you should always try to teach the best practices) as well as suggesting that it is totally fine to store passwords unencrypted without anything to protect them.
If you wanted to teach people about python then take down this article and start simple.

Collapse
 
vlasales profile image
Vlastimil Pospichal

It's too complicated. Use a database (eg SQLite) instead.

Collapse
 
muhimen123 profile image
Muhimen

Thanks, I will try it for sure. πŸ˜‰

Collapse
 
jonasgozdecki profile image
Jonas Gozdecki

Please, move this a new post as "How to read/write text file with data in Python".
The context of "Password manager" is the opposite of store plain text sensitive data.
Advice: Do not mention your employee's company name nor project. They may suffer more invasion attacks motivated by no security worries in your post.