Advertisement
Guest User

Untitled

a guest
Dec 15th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. PASSWORDS = {'email': 'easyPW', 'blog': 'hardPW', 'luggage': '12345'}
  2.  
  3. import sys, pyperclip if len(sys.argv) < 2: print('Usage: python pw.py [account] - copy account password') sys.exit()
  4.  
  5. account = sys.argv[1] # first command line arg is the account name
  6.  
  7. if account in PASSWORDS: pyperclip.copy(PASSWORDS[account]) print('Password for ' + account + ' copied to clipboard.') else: print('There is no account named ' + account)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement