Тёмный

Password Manager in Python 

NeuralNine
Подписаться 358 тыс.
Просмотров 62 тыс.
50% 1

Today we learn how to build a simple password manager in Python.
◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
📚 Programming Books & Merch 📚
🐍 The Python Bible Book: www.neuralnine.com/books/
💻 The Algorithm Bible Book: www.neuralnine.com/books/
👕 Programming Merch: www.neuralnine.com/shop
🌐 Social Media & Contact 🌐
📱 Website: www.neuralnine.com/
📷 Instagram: / neuralnine
🐦 Twitter: / neuralnine
🤵 LinkedIn: / neuralnine
📁 GitHub: github.com/NeuralNine
🎙 Discord: / discord
🎵 Outro Music From: www.bensound.com/

Наука

Опубликовано:

 

1 мар 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 66   
@mr.whiteboard6357
@mr.whiteboard6357 2 года назад
Wooow, so good video with even great explantion. Thank you so much neural nine.
@denbompa
@denbompa 2 года назад
Great video! learned a lot
@VedaVoyager
@VedaVoyager 2 года назад
🤩! Awesome! Please create a video to create a mobile app and connect to any Python program to work on backend!
@jaspreetsingh4362
@jaspreetsingh4362 2 года назад
Wow its amazing please make a video for gui password manager
@subhankarchakraborty3866
@subhankarchakraborty3866 2 года назад
Amazing brother
@maxtuck6820
@maxtuck6820 8 месяцев назад
Great Video! When I decode the passwords I'm getting " b' " preceding the password so I had to import codecs and then wrap the decode statement into codecs.decode(Fernet(self.key).decrypt(encrypted.encode()) in order to eliminate the prefix. This converted the passwords to string instead of byte type
@charlesdixon1950
@charlesdixon1950 2 года назад
Wich video did you do the "__main__" thing that is mentioned?
@adityaranigaon
@adityaranigaon 2 года назад
Good job
@canadianbeast8671
@canadianbeast8671 2 года назад
great!
@sussy7123
@sussy7123 9 месяцев назад
I'm getting an error at line 25 it says unresolved attribute reference 'add_password' for class 'PasswordManager' edit: I found out that tabnine typed 'add_password_file' instead of 'add_password'
@moimiess
@moimiess 2 года назад
pretty cool
@wznzgq1354
@wznzgq1354 8 месяцев назад
how would u implement it so that key is derived each time form the passphrase? generating same key for the same passphrase each time
@UndyingEDM
@UndyingEDM 7 месяцев назад
What is the most reliable python cryptography module or modules?
@redouanha
@redouanha 2 года назад
Great video, but I have one question, isn't that password manager vulnerable? I mean anyone with access to the .key and the .password files will be able to simply decrypt and read the password right? or maybe i'm missing something here ..
@Bl0xxy
@Bl0xxy 2 года назад
turn it into .exe by comping all the files. all files will be hidden and turned into one
@jeka1030
@jeka1030 Год назад
@@Bl0xxy that would make the program use the same key for any user...
@Bl0xxy
@Bl0xxy Год назад
​@@jeka1030 but what if you use a randomizer for first launch?
@KyXnline
@KyXnline Год назад
You're right. You want to use hashing instead if you want to make this secure
@Felipe_Ribeir0
@Felipe_Ribeir0 9 месяцев назад
You must secure the code/key/password files too.
@kyawzinlatt3434
@kyawzinlatt3434 Год назад
Hello thank you….how can I add hashing?
@Stufy76
@Stufy76 Год назад
Could I add 2fa onto this ?
@blkkitty27
@blkkitty27 Год назад
does anyone know what style guide he uses when coding?
@theeligator8728
@theeligator8728 4 месяца назад
PEP 8 i guess..
@hajimenagao8806
@hajimenagao8806 2 года назад
Thank you! this is not so difficult for me.
@-MePix-
@-MePix- Год назад
mine says could not be resolved from source
@luggas1392
@luggas1392 Год назад
When I try to print the key like u did at 4:58, it gibes me the error message : 'PasswordManager' object has no attribute 'create_key'. Any ideas?
@alexsloan2814
@alexsloan2814 10 месяцев назад
Having the same problem. Trying to slove it now.
@austinnunez2031
@austinnunez2031 2 года назад
Hi, i'm facing a really odd issue, for some reason, even though i have testkey.key in my folder with my password.py file, when i press option 2 and then type testkey.key, it says no such file or directory found, even though the file is right there, why is this so? thank you
@austinnunez2031
@austinnunez2031 2 года назад
nevermind, i figured out i have to direct it to the specific folder it's in first, despite it all being in the same folder...weird, so for me its not just "testkey.key" but "Project\testkey.key", and same applied to mypassword.pass
@kishankushwaha4933
@kishankushwaha4933 2 года назад
@@austinnunez2031 hey bro i have same problem what did you do?
@mr.bumblebee890
@mr.bumblebee890 Год назад
@@kishankushwaha4933 Specify the directory of the "testkey.key" file, e.g "Testproject\testkey.key" and if that won't work use the full directory of the file
@sennlich
@sennlich 6 месяцев назад
Top Top
@data9051
@data9051 2 года назад
I completed everything, but now I am stuck with a NameError when I do #5 in the cli it says that name 'password' is not deefined. Any help? I can post the code if need be.
@Nobody-yp7ob
@Nobody-yp7ob 7 дней назад
Somewhere in your code it says password = … well there’s your error in there. Probably tells you what line also
@baileyyea1638
@baileyyea1638 Год назад
the main at the bottum line is having a problem
@MortenSMortenS
@MortenSMortenS Год назад
I don't get this.. So in this program I have to literally write all my passwords into the script in the dictionary? How is that safe, and all the encryption and decryption and stuff seems pointless to me then.. I don't get it, why not just have a textfile with all the sites and passwords? What does this do? I feel dumb
@thomasgoodwin2648
@thomasgoodwin2648 2 года назад
Seems that so much of programming requires constant Internet access these days. Is there any advice you can give on coding when given very limited or perhaps even non-existent inet access? (In my case it's limited by the fact I have to use my cellphone for all my inet.) Take care of yourself. Your health is far more important than educating my dumb a... ... self. Hope you feel better soon! ❤️
@techgoat618
@techgoat618 2 года назад
if using python 3.10.x I think hashlib and crypt are part of the standard python library, so no need to import an external like cryptography; both hashlib and crypt have been in python since 3.6.x; i don't know how yet to use them but they are referenced in some RU-vid videos
@thomasgoodwin2648
@thomasgoodwin2648 2 года назад
@@techgoat618 How does that help reduce the need for inet access? Wrong thread? jus askin..
@techgoat618
@techgoat618 2 года назад
@@thomasgoodwin2648 there was a reference to use of a cell phone for internet access, if coding in Python the presumption is python is loaded locally already, pip'ing external modules then is reliance on the net, so a local library that is native to Python already installed wont need internet access to retrieve it. So browse the net on the cell, for research, but then you'd need to hot-spot the cell phone and connect the laptop to download, i.e. 'pip install...' jus sayin
@thomasgoodwin2648
@thomasgoodwin2648 2 года назад
@@techgoat618 Ok. Gotcha. Actually I am tethering on my cell now. Problem is, even the 'unlimited' plans seem to come with a lot of limitations that amount to caps. I appreciate your response and though it it doesn't apply directly in my case, perhaps it will help someone else in a different but similar situation. Good lookin' out! 👍
@vk56722
@vk56722 Год назад
Hi, great video..but Im getting an error for whenever i load the password file. This is what it looks like: Enter your choice: 4 Enter path: pass.pass Traceback (most recent call last): File "/Users/---/Documents/vsc_projs/practice.py", line 99, in main() File "/Users/---/Documents/vsc_projs/practice.py", line 83, in main pm.load_password_file(path) File "/Users/---/Documents/vsc_projs/practice.py", line 32, in load_password_file site, encrypted = line.split(":") TypeError: a bytes-like object is required, not 'str' This is the code for that part: def load_password_file(self, path): self.password_file = path with open(path, 'rb') as f: for line in f: site, encrypted = line.split(":") self.password_dict[site] = Fernet(self.key).decrypt(encrypted.encode()).decode() I was hoping you could help tell me what I did wrong.
@lineofdead123456789
@lineofdead123456789 Год назад
with open(path, 'rb') as f: ---> with open(path, 'r') as f:
@user-nr1qk6oi7g
@user-nr1qk6oi7g 8 месяцев назад
encode it first
@Jay716
@Jay716 Год назад
When you entered if __name__ == "__main__": main() I get main is not defined. what am I missing?
@Jay716
@Jay716 Год назад
Figured it out had wrong ident spacing
@fulbertkoffi5640
@fulbertkoffi5640 Год назад
@Jay716, i get the same problem. Please help me to fix it. I don't understand what you mean to fix yours.
@Jay716
@Jay716 Год назад
@@fulbertkoffi5640 make sure that if __name__ == "__main__": main() is outside of the if statement hope that helps.
@Empire_games_08
@Empire_games_08 Год назад
Write like this If __name__ == "__main__" : Main()
@Empire_games_08
@Empire_games_08 Год назад
You missed underscore
@fulbertkoffi5640
@fulbertkoffi5640 Год назад
Hello! thank you a lot for this. Very good job. But i get this error when i try it : NameError: name 'main' is not defined. Did you mean: 'min'? Please help to fix
@fulbertkoffi5640
@fulbertkoffi5640 Год назад
IS OK for now! tks
@avenotrius4340
@avenotrius4340 2 года назад
time stamps to myself: 0:25
@Gr1ovee
@Gr1ovee 5 месяцев назад
Nice tutorial for a simple passwort manager but for the real world its not worth using bc can easily be hacked
@AliKhandi
@AliKhandi 2 года назад
you don't like virtualenv?
@JarppaGuru
@JarppaGuru 5 месяцев назад
and there bug. create key create file. need add password before file saved? and when files are loaded create key create file all sites and password + default ones go new file so you have duplicates def create_password_file(self,path, initial_values=None): self.password_dict = {} #fix same when load file also pimped to have default.key default.file on start if not exist it create it with default values. so we are quickly business xD added list sites so not need quess when there no error check also added remove site and change password. now its kinda manager with when load key its print keys on folder also on file quickly ca choose without write name
@caseyhrt
@caseyhrt 9 месяцев назад
When running choice 3 I get this error: "Traceback (most recent call last): File: . . . line 99, in main() File: . . .line 80, in main pm.create_password_file(path, password) File: . . .line 25, in create_password_file self.add_password(key, value) File: . . .line 36, in add_password self.password_dict[site] = password ^^^^^^^^^^^^^^^^^^ AttributeError: 'PasswordManager' object has no attribute 'password_dict'. Did you mean: 'password_file'? " I re-watched the video, looking for errors on my part, but couldn't find any. Could this be that I am missing a plugin or am overlooking something? Let me know what you all think. Thanks
@caseyhrt
@caseyhrt 9 месяцев назад
I fixed the bug!
@JarppaGuru
@JarppaGuru 5 месяцев назад
good practical programming,but nothing todo managing. managing is notepad then encrypt file this not even change password or site and not delete and key should be protected by password otherwise anyone who launch script can manage even there nothing to manage just add
@tcgvsocg1458
@tcgvsocg1458 2 года назад
please do a recorder video but python no import only python vanilla please
@profsor5008
@profsor5008 2 года назад
In my opinion, this video is unuseful. Why? Password manager MUST BE comfortable. When I open steam, email, VPN and another app then my password manager must automatically fill text fields to replace my routine. Here is simple app which write and read text from file + encrypt and decrypt text by ready python module + simple menu based on if statements.. why not match (pythonic switch)?
@techgoat618
@techgoat618 2 года назад
I found NeuralNine's password manager very "comfortable" because it educated me about how to create a functional password manager; plus the use case appears to be oriented toward the command line rather than an app that auto-fills password in your gaming app or wherever. I have and use LastPass and other apps for my auto-fill needs, but with respect to learning python NeuralNine''s example was well presented, IMHO
@multiarray2320
@multiarray2320 2 года назад
are you really too lazy to copy and paste a password?
@techgoat618
@techgoat618 2 года назад
@@multiarray2320 where is the fun in that? my goals include learning how to write code in Python that allows me to use hand-crafted CLI tools. All the apps I already have all have saved passwords, and browsers have saved passwords, so i would really only ever cut and paste once. I *could* do it that way, but it defeats my purposes, of learning... there is an elegance to crafting an app for the command line that accesses credentials stored securely in a file, rather than the throw-back neo-caveman way of cutting and pasting...IMHO
@kristof4514
@kristof4514 2 года назад
@@techgoat618 same here, it's not that i cant remember my passwords, its more like i want to learn how to do encryption and file managing from a close to practical standpoint
Далее
Coding Encrypted Chat in Python
20:33
Просмотров 46 тыс.
Mini Python Project Tutorial - Password Generator
18:27
Разоблачение ушные свечи
00:28
Просмотров 296 тыс.
Бмв сгорела , это нормально?
01:01
Hidden Password Input in Python
9:40
Просмотров 14 тыс.
Making A Password Manager Using Python & SQL
16:10
Просмотров 213 тыс.
Encryption program in Python 🔒
8:41
Просмотров 112 тыс.
Hacker Teaches How to Manage Passwords
4:51
Просмотров 131 тыс.
5 Mini Python Projects - For Beginners
1:41:08
Просмотров 2,8 млн
I Wrote a Password Manager with Python & SQL
14:37
Просмотров 27 тыс.
Hide Information in JPEG Files
16:19
Просмотров 177 тыс.