Advertisement
mengyuxin

meng.pw.py

Dec 31st, 2017
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.60 KB | None | 0 0
  1. #! python3
  2. # pw.py - An insecure password locker program.
  3. PASSWORDS = {'email': '11111111111111111',
  4.             'blog': '222222222222222',
  5.             'web': '333333333333333333',
  6.             'wexin': 'aaaaaaaaaaaaaaaaa'}
  7.  
  8. import sys, pyperclip
  9.  
  10. if len(sys.argv) < 2:
  11.     print('Usage: py pw.py [account] - copy account password')
  12.     sys.exit()
  13.  
  14. account = sys.argv[1] # first command line arg is the account name
  15.  
  16. if account in PASSWORDS:
  17.     pyperclip.copy(PASSWORDS[account])
  18.     print('Password for ' + account + ' copied to clipboard.')
  19. else:
  20.     print('There is no account named ' + account)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement