daily pastebin goal
11%
SHARE
TWEET

Untitled

a guest Apr 3rd, 2012 26 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
Pastebin PRO WINTER Special!
Get 40% OFF Pastebin PRO accounts!
Top