Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os,re
- match = re.compile("(super secret recepients)")
- pgp = "----- BEGIN PGP"
- files = []
- for top,ds,fs in os.walk(os.path.expanduser("/place/.maildir/")):
- files.extend((os.path.join(top,f) for f in fs))
- files.sort(key=lambda path: -os.stat(path).st_mtime)
- for path in files:
- with open(path) as inp:
- msg = inp.read()
- if not pgp in msg: continue
- ret = match.search(msg)
- if ret:
- print(path)
- print msg
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement