Advertisement
Guest User

Untitled

a guest
Apr 3rd, 2012
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. import os,re
  2.  
  3. match = re.compile("(super secret recepients)")
  4. pgp = "----- BEGIN PGP"
  5.  
  6. files = []
  7. for top,ds,fs in os.walk(os.path.expanduser("/place/.maildir/")):
  8.     files.extend((os.path.join(top,f) for f in fs))
  9. files.sort(key=lambda path: -os.stat(path).st_mtime)
  10. for path in files:
  11.     with open(path) as inp:
  12.         msg = inp.read()
  13.     if not pgp in msg: continue
  14.     ret = match.search(msg)
  15.     if ret:
  16.         print(path)
  17.         print msg
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement