Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! python3
- """This program will act as a password manager
- that will be executable from the command console.
- It will work by typing in a command line along with
- the account you want the password for. It will copy
- it from a database onto the pc clipboard, ready
- for you to paste where ever you want."""
- # Code begins here
- PASSWORDS = {"email": "4527", "facebook": "1234"}
- import sys, pyperclip
- if len(sys.argv) < 2:
- print("Usage: python pw.py [account] - copy account password")
- sys.exit()
- while True:
- print(list(PASSWORDS.keys()))
- print("Please select account:")
- account = sys.argv[1]
- pyperclip.copy(PASSWORDS.get(account, ""))
- if account in PASSWORDS.keys():
- print("Password for " + account + " copied!")
- break
- else:
- print("There is no password logged for account named " + account + ".")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement