#!/usr/bin/env python import hashlib secret = "iwrupvqb".encode('utf-8') counter = 0 hash = hashlib.md5(secret).hexdigest() while hash.startswith("00000") == False: counter += 1 hash = hashlib.md5(secret + str(counter).encode('utf-8')).hexdigest() print(counter)