Email Dumper from .mbox Files

Mar 1st, 2021 (edited)
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import re
  3. def dumperurl():
  4.     with open("a.mbox") as file:
  5.             for line in file:
  6.                 urls = re.findall("[^@ \t\r\n]+@[^@ \t\r\n]+\.[^@ \t\r\n]+",line)
  7.                 if urls:
  8.                     urlre = urls[0]
  9.                     if '@' in urlre:
  10.                         b = urlre.strip(")<>;")
  11.                         print(b)
  12.                         open('MAILIST.txt', 'a').write(b+"\n")
  13.                     else:
  14.                         pass
  15.                 else:
  16.                     pass
  17. dumperurl()
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add to your ad blocker whitelist or disable your adblocking software.