Skip to content

Instantly share code, notes, and snippets.

@Omeryl

Omeryl/test.py Secret

Created June 17, 2017 03:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Omeryl/c6cbe603721f5671b9056ca127399946 to your computer and use it in GitHub Desktop.
Save Omeryl/c6cbe603721f5671b9056ca127399946 to your computer and use it in GitHub Desktop.
# totest is simply the output of `grep -lr "DKIM-Signature" . > ../totest`
# pretty naive for the most part, don't have much time to put to this tonight unfortunately.
# you can grab the archive from https://file.wikileaks.org/file/podesta-emails/podesta-emails.mbox-2016-11-06.gz
# and split it into individual eml files.
import dkim # this is dkimpy
emls = open('totest', 'r').read().splitlines()
for eml in emls:
d = dkim.DKIM(open('out/{}'.format(eml)).read())
try:
res = d.verify()
except Exception as e:
print("EML failed, {}: {}".format(eml, e))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment