From d5dd021c7721db0f9cd7832665eb763f287555c2 Mon Sep 17 00:00:00 2001 From: Pekka Helenius Date: Mon, 8 Apr 2019 19:15:09 +0300 Subject: [PATCH] Code: fix indentation --- data/dns-sinkhole_gen.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/data/dns-sinkhole_gen.py b/data/dns-sinkhole_gen.py index 69a2e13..e52bab7 100755 --- a/data/dns-sinkhole_gen.py +++ b/data/dns-sinkhole_gen.py @@ -299,20 +299,20 @@ for blacklist in domains_blacklists: if not blacklist_dataset is None: for line in (fetchdomaindata(blacklist_dataset)): - if not line in whitelist_fetched_data: + if not line in whitelist_fetched_data: - if re.search('^\.', line): - pdnsd_line = "neg { name=*" + line + "; types = domain; }" - elif re.search('\*', line): - pdnsd_line = "neg { name=" + line + "; types = domain; }" - else: - pdnsd_line = "rr { name=" + line + "; a=0.0.0.0; }" - dnscrypt_line = line + " " + "0.0.0.0" + if re.search('^\.', line): + pdnsd_line = "neg { name=*" + line + "; types = domain; }" + elif re.search('\*', line): + pdnsd_line = "neg { name=" + line + "; types = domain; }" + else: + pdnsd_line = "rr { name=" + line + "; a=0.0.0.0; }" + dnscrypt_line = line + " " + "0.0.0.0" - filewrite(filepath, pdnsd_tempfile, pdnsd_line + '\n', 'a', False) + filewrite(filepath, pdnsd_tempfile, pdnsd_line + '\n', 'a', False) - if not dnscrypt_line is None: - filewrite(filepath, dnscrypt_tempfile, dnscrypt_line + '\n', 'a', False) + if not dnscrypt_line is None: + filewrite(filepath, dnscrypt_tempfile, dnscrypt_line + '\n', 'a', False) #################### # Parse generated list, get only unique lines and write to final file