Advertisement
Guest User

Untitled

a guest
May 26th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #!/usr/bin/env python3
  2.  
  3. from hashlib import sha1
  4. from itertools import count
  5.  
  6. def hash_it(gen):
  7. for i in gen:
  8. input_string = "Netzwerksicherheit_{}".format(i).encode()
  9. hash_code = sha1(input_string).hexdigest()
  10. yield (input_string, hash_code)
  11.  
  12. if __name__ == "__main__":
  13. g = hash_it(count())
  14. last = next(g)
  15. while not last[1].startswith("0000"):
  16. last = next(g)
  17. print(last)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement