Skip to content

Instantly share code, notes, and snippets.

@zielmicha
Created December 2, 2013 14:39
Show Gist options
  • Save zielmicha/7750406 to your computer and use it in GitHub Desktop.
Save zielmicha/7750406 to your computer and use it in GitHub Desktop.
Generate password for website from master one
import getpass, hashlib
domain = raw_input('domain: ')
assert not domain.startswith('www.')
pas = getpass.getpass()
pas1 = getpass.getpass()
assert pas == pas1
print hashlib.sha1(domain + pas).hexdigest()[:16]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment