Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2018
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #! python3
  2. # pw.py - An insecure password locker program.
  3.  
  4.  
  5. PASSWORDS = {'email': 'emailpassword',
  6. 'bank': 'bankpassword',
  7. 'luggage': '12345'}
  8.  
  9.  
  10. import sys, pyperclip
  11. if len(sys.argv) < 2:
  12. print('Usage: python pw.py [account] - copy account password')
  13. sys.exit()
  14.  
  15.  
  16. account = sys.argv[1] # first command line arg is the account name
  17.  
  18.  
  19. if account in PASSWORDS:
  20. pyperclip.copy(PASSWORDS[account])
  21. print('Password for ' + account + ' copied to clipboard.')
  22. else:
  23. print('There is no account named ' + account)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement