#!/usr/local/bin/python # # dump adblocker.reg domains to stdout # # import re, string, sys def main (): domain_re = re.compile (r'\\Zones\\([\w\.\-]+)') try: f = file ('adblocker.reg') for line in f.readlines (): line = line.translate (string.maketrans ('', ''), '\0') # strip unicode nulls m = domain_re.search (line) if m: print m.group (1) except IOError: print "Hmm, can't find adblocker.reg; exiting." main ()