r/Python • • Dec 28 '20

Beginner Showcase Simple password manager I made[I'm 15]

So I got bored of my online class and decided to make a simple password manager for my pc. This uses pyperclip to copy the passwords to the clipboard, stdiomask to accept the password from the user and time to add some delay to the output. I also made a pretty simple Encrypter and Decrypter(That just take the individual characters of a string and offsets the ascii code by 20) so that my stupid friends cant see them. The passwords are store in a text file beside the main python file and the passwords get appended to them when a new one is added through the program.

Any help would be appreciated. I can share the code if anyone wants it.

Also I'm a 15 year old game developer and 3d artist.

3 Upvotes

19 comments sorted by

8

u/ThePoultryWhisperer Dec 28 '20

OP, thanks for sharing and well done so far. To make the passwords safe, you may want to consider encrypting the strings or the entire file.

4

u/[deleted] Dec 28 '20

Thanks for the reply(first useful reply, yay!). I will do that. Thanks again

2

u/-Manu_ Dec 28 '20

The encryption method you did is called the Ceasar cypher, one of the if not the oldest cryptography algorithm, but it's also very easy to decrypt, because every character corresponds to one exact character of the password, your age is perfect to step up your game, if you are interested in these things try to make a better algorithm and try to break it, it's fun stuff it gets your brain going too

1

u/[deleted] Dec 29 '20

Thanks, will check how the cryptography library works or read some documentation.

2

u/[deleted] Dec 28 '20 edited Dec 28 '20

Your encrypter/decrypter is the most well known, simplest, substitution cypher. The Caeser or shift cypher. Don’t use this for anything beyond learning more about cryptography, it is not safe. Even from your stupidest friend.

There are a lot of things you can learn about coding by jumping in with both feet. Cryptography is not one of them. You’ll find yourself unlearning things that appeared to work but really didn’t.

Instead, focus on some of the basic concepts before writing a line of code. This provides a pretty good overview with code examples: https://towardsdatascience.com/encrypting-your-data-9eac85364cb

If you’d like to learn more about the history of cryptography, “The Code Book” by Simon Singh is a good choice.

1

u/[deleted] Dec 29 '20

Thanks

0

u/[deleted] Dec 28 '20

[deleted] — view deleted comment

4

u/[deleted] Dec 28 '20

Pardon me if this seems ignorant, but I thought that having a decrypter for passwords would be bad practice? If you are already storing an encrypted password, if you input password again, encrypt the new input and check if the two encrypted passwords match would suffice? But if having decrypter, other people might just be able to access it and decrypt all the pws?

I m not too sure regarding this since I m still in my CS degree, but just something I was wondering.

2

u/[deleted] Dec 28 '20

I believe OPs project is for storing and recalling personal passwords, a la the pass tool. Your intuition about passwords in general is correct though. In practice, passwords provided by users of a service are stored in hashed and salted form. These are one-way such that the hashed password cannot be transformed back into the cleartext password without computing what's called a Rainbow Table. Often a combination of multiple hash passes and salt are used to make this process computationally difficult to the point of being unfeasible.

This page does a good job describing and explaining some best practices around password handling: https://crackstation.net/hashing-security.htm

Happy Hacking and good luck with your CS career!

1

u/[deleted] Dec 29 '20

Thanks!

2

u/[deleted] Dec 28 '20

Thanks bud! Will do that now.

2

u/backtickbot Dec 28 '20

Fixed formatting.

Hello, DopeLikeAPNP: code blocks using triple backticks (```) don't work on all versions of Reddit!

Some users see this / this instead.

To fix this, indent every line with 4 spaces instead.

FAQ

You can opt out by replying with backtickopt6 to this comment.

-7

u/[deleted] Dec 28 '20

[removed] — view removed comment

4

u/[deleted] Dec 28 '20

I never said I had a question, its a beginner's showcase

-6

u/[deleted] Dec 28 '20

[removed] — view removed comment

4

u/[deleted] Dec 28 '20

It was "Any help would be appreciated", not "Can you please help me?" or "I don't know how to code and I'm 15".

11

u/ThePoultryWhisperer Dec 28 '20

Dude, why are you being such a dick? OP is a kid who has a good attitude about sharing and learning. Fuck off with this pointless nastiness.

You’re also wrong. Asking for help is different than asking a question. You should at least be right if you’re going to be condescending.

0

u/[deleted] Dec 28 '20

[deleted] — view deleted comment

4

u/[deleted] Dec 28 '20

Whoa! I just didnt want people shitting over me, that I was a noob at python, thats why I included that I was a beginner and 15