Browse Source

Code: fix indentation

master
Pekka Helenius 5 years ago
committed by GitHub
parent
commit
d5dd021c77
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 11 deletions
  1. +11
    -11
      data/dns-sinkhole_gen.py

+ 11
- 11
data/dns-sinkhole_gen.py View File

@ -299,20 +299,20 @@ for blacklist in domains_blacklists:
if not blacklist_dataset is None: if not blacklist_dataset is None:
for line in (fetchdomaindata(blacklist_dataset)): 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 # Parse generated list, get only unique lines and write to final file


Loading…
Cancel
Save