Last active
December 18, 2015 15:29
-
-
Save fovtran/5804344 to your computer and use it in GitHub Desktop.
email list HMAC digester by their names using a single passkey
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# | |
import base64 | |
import hmac | |
import hashlib | |
import sys,os | |
mainpass="mysupersecreto" | |
sitelist = [] | |
digest = hmac.new(mainpass, '', hashlib.sha1) | |
def digesto_incremental(): | |
f = open("guestlist.txt", "rb") | |
try: | |
while True: | |
line = f.readline() | |
if not line: | |
break | |
sitelist.append(line) | |
finally: | |
f.close() | |
def digestar(): | |
for site in sitelist: | |
digest.update(site) | |
r = digest.hexdigest() | |
print site,":", base64.encodestring(r) | |
digesto_incremental() | |
digestar() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment