Guest User

markfiend

a guest
Oct 8th, 2009
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.18 KB | None | 0 0
  1. #!/usr/bin/python
  2. '''
  3. Password generator
  4. Copyright 2009 Mark Wolstenholme
  5. markfiend <at> gmail <dot> com
  6.  
  7.    This program is free software: you can redistribute it and/or modify
  8.    it under the terms of the GNU General Public License as published by
  9.    the Free Software Foundation, either version 3 of the License, or
  10.    (at your option) any later version.
  11.  
  12.    This program is distributed in the hope that it will be useful,
  13.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.    GNU General Public License for more details.
  16.  
  17.    You should have received a copy of the GNU General Public License
  18.    along with this program.  If not, see <http://www.gnu.org/licenses/>.
  19. '''
  20. # You won't actually have received a copy of the GPL. It's longer than this
  21. # script, by at least an order of magnitude.
  22.  
  23. import base64, hashlib
  24.  
  25. pw = input('Master password: ') # could be hardcoded for convenience
  26. site = input('Site to generate for: ')
  27. salt = 'This is a secret salt' # this should be changed before use
  28. root = pw + salt + site
  29.  
  30. print(base64.b64encode(hashlib.md5(root.encode()).digest()).decode())
Add Comment
Please, Sign In to add comment