Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python3
- from hashlib import sha1
- from itertools import count
- def hash_it(gen):
- for i in gen:
- input_string = "Netzwerksicherheit_{}".format(i).encode()
- hash_code = sha1(input_string).hexdigest()
- yield (input_string, hash_code)
- if __name__ == "__main__":
- g = hash_it(count())
- last = next(g)
- while not last[1].startswith("0000"):
- last = next(g)
- print(last)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement