Guest User

markfiend

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