logger.warning("block[blocked]='%s' is empty, blocker='%s'", block["blocked"], blocker)
continue
elif block["blocked"].endswith(".onion"):
- logger.debug("blocked='%s' is a TOR .onion domain - SKIPPED", block["blocked"])
+ logger.debug("block[blocked]='%s' is a TOR .onion domain - SKIPPED!", block["blocked"])
continue
elif block["blocked"].endswith(".i2p") and not config.get("allow_i2p_domain"):
- logger.debug("blocked='%s' is an I2P .onion domain - SKIPPED", block["blocked"])
+ logger.debug("block[blocked]='%s' is an I2P .onion domain - SKIPPED!", block["blocked"])
continue
elif block["blocked"].endswith(".arpa"):
- logger.debug("blocked='%s' is a reverse IP address - SKIPPED", block["blocked"])
+ logger.debug("block[blocked]='%s' is a reverse IP address - SKIPPED!", block["blocked"])
continue
elif block["blocked"].endswith(".tld"):
- logger.debug("blocked='%s' is a fake domain - SKIPPED", block["blocked"])
+ logger.debug("block[blocked]='%s' is a fake domain - SKIPPED!", block["blocked"])
continue
elif block["blocked"].find("*") >= 0:
logger.debug("blocker='%s' uses obfuscated domains", blocker)
logger.debug("row[]='%s'", type(row))
if row is None:
- logger.warning("Cannot deobfuscate blocked='%s',blocker='%s',software='%s' - SKIPPED!", block["blocked"], blocker, software)
+ logger.warning("Cannot deobfuscate block[blocked]='%s',blocker='%s',software='%s' - SKIPPED!", block["blocked"], blocker, software)
continue
deobfuscated = deobfuscated + 1
logger.debug("row[]='%s'", type(row))
if row is None:
- logger.warning("Cannot deobfuscate blocked='%s',blocker='%s',software='%s' - SKIPPED!", block["blocked"], blocker, software)
+ logger.warning("Cannot deobfuscate block[blocked]='%s',blocker='%s',software='%s' - SKIPPED!", block["blocked"], blocker, software)
continue
deobfuscated = deobfuscated + 1
origin = row["origin"]
nodeinfo_url = row["nodeinfo_url"]
- logger.debug("Looking up instance by domain, blocked='%s'", block["blocked"])
+ logger.debug("Looking up instance by domain, block[blocked]='%s'", block["blocked"])
if block["blocked"] in [None, ""]:
logger.debug("block[blocked]='%s' is empty - SKIPPED!", block["blocked"])
continue
logger.warning("block[blocked]='%s' is not a valid domain - SKIPPED!", block["blocked"])
continue
elif block["blocked"].endswith(".onion"):
- logger.debug("block[blocked]'%s' is a TOR .onion domain - SKIPPED", block["blocked"])
+ logger.debug("block[blocked]'%s' is a TOR .onion domain - SKIPPED!", block["blocked"])
continue
elif block["blocked"].endswith(".i2p") and not config.get("allow_i2p_domain"):
- logger.debug("block[blocked]'%s' is an I2P .onion domain - SKIPPED", block["blocked"])
+ logger.debug("block[blocked]'%s' is an I2P .onion domain - SKIPPED!", block["blocked"])
continue
elif block["blocked"].endswith(".arpa"):
- logger.debug("block[blocked]'%s' is a reverse IP address - SKIPPED", block["blocked"])
+ logger.debug("block[blocked]'%s' is a reverse IP address - SKIPPED!", block["blocked"])
continue
elif block["blocked"].endswith(".tld"):
- logger.debug("block[blocked]'%s' is a fake domain - SKIPPED", block["blocked"])
+ logger.debug("block[blocked]'%s' is a fake domain - SKIPPED!", block["blocked"])
continue
logger.debug("block[blocked]='%s' - BEFORE!", block["blocked"])
for row in domains:
logger.debug("row[]='%s'", type(row))
if row["domain"].endswith(".i2p") and not config.get("allow_i2p_domain"):
- logger.debug("row[domain]='%s' is an I2P address - SKIPPED", row["domain"])
+ logger.debug("row[domain]='%s' is an I2P address - SKIPPED!", row["domain"])
continue
elif row["domain"].endswith(".onion"):
- logger.debug("row[domain]='%s' is a TOR .onion domain - SKIPPED", row["domain"])
+ logger.debug("row[domain]='%s' is a TOR .onion domain - SKIPPED!", row["domain"])
continue
elif row["domain"].endswith(".arpa"):
- logger.debug("row[domain]='%s' is a reverse IP address - SKIPPED", row["domain"])
+ logger.debug("row[domain]='%s' is a reverse IP address - SKIPPED!", row["domain"])
continue
elif row["domain"].endswith(".tld"):
- logger.debug("row[domain]='%s' is a fake domain - SKIPPED", row["domain"])
+ logger.debug("row[domain]='%s' is a fake domain - SKIPPED!", row["domain"])
continue
elif blacklist.is_blacklisted(row["domain"]):
logger.debug("row[domain]='%s' is blacklisted - SKIPPED!", row["domain"])
logger.debug("domain='%s' is empty - SKIPPED!", domain)
continue
elif domain.endswith(".onion"):
- logger.debug("domain='%s' is a TOR .onion domain - SKIPPED", domain)
+ logger.debug("domain='%s' is a TOR .onion domain - SKIPPED!", domain)
continue
elif domain.endswith(".i2p") and not config.get("allow_i2p_domain"):
- logger.debug("domain='%s' is an I2P .onion domain - SKIPPED", domain)
+ logger.debug("domain='%s' is an I2P .onion domain - SKIPPED!", domain)
continue
elif domain.endswith(".arpa"):
- logger.debug("domain='%s' is a reverse IP address - SKIPPED", domain)
+ logger.debug("domain='%s' is a reverse IP address - SKIPPED!", domain)
continue
elif domain.endswith(".tld"):
- logger.debug("domain='%s' is a fake domain - SKIPPED", domain)
+ logger.debug("domain='%s' is a fake domain - SKIPPED!", domain)
continue
elif domain.find("*") >= 0 or domain.find("?") >= 0:
logger.debug("domain='%s' is obfuscated - Invoking utils.deobfuscate(%s, %s) ...", domain, domain, blocker)
logger.warning("instance='%s' is not a valid domain - SKIPPED!", instance)
continue
elif instance.endswith(".onion"):
- logger.debug("instance='%s' is a TOR .onion instance - SKIPPED", instance)
+ logger.debug("instance='%s' is a TOR .onion instance - SKIPPED!", instance)
continue
elif instance.endswith(".i2p") and not config.get("allow_i2p_domain"):
- logger.debug("instance='%s' is an I2P .onion instance - SKIPPED", instance)
+ logger.debug("instance='%s' is an I2P .onion instance - SKIPPED!", instance)
continue
elif instance.endswith(".arpa"):
- logger.debug("instance='%s' is a reverse IP address - SKIPPED", instance)
+ logger.debug("instance='%s' is a reverse IP address - SKIPPED!", instance)
continue
elif instance.endswith(".tld"):
- logger.debug("instance='%s' is a fake instance - SKIPPED", instance)
+ logger.debug("instance='%s' is a fake instance - SKIPPED!", instance)
continue
logger.debug("instance='%s' - BEFORE!", instance)
for peer in rows[key]:
logger.debug("peer[%s]='%s' - BEFORE!", type(peer), peer)
if peer in [None, ""]:
- logger.debug("peer is empty - SKIPPED")
+ logger.debug("peer is empty - SKIPPED!")
continue
elif isinstance(peer, dict) and "domain" in peer:
logger.debug("peer[domain]='%s'", peer["domain"])
logger.info("Checking/converting %d domain names ...", len(rows))
for row in rows:
logger.debug("row[]='%s'", type(row))
+ if row[column] in [None, ""]:
+ logger.warning("row[%s]='%s' is empty - SKIPPED!", column, row[column])
+ continue
+ elif not validators.domain(row[column].split("/")[0], rfc_2782=True):
+ logger.warning("row[%s]='%s' is not valid domain - SKIPPED!", column, row[column])
+ continue
+ elif row[column].endswith(".onion"):
+ logger.debug("row[%s]='%s' is a TOR .onion domain - SKIPPED!", column, row[column])
+ continue
+ elif row[column].endswith(".i2p") and not config.get("allow_i2p_domain"):
+ logger.debug("row[%s]='%s' is an I2P .onion domain - SKIPPED!", column, row[column])
+ continue
+ elif row[column].endswith(".arpa"):
+ logger.debug("row[%s]='%s' is a reverse IP address - SKIPPED!", column, row[column])
+ continue
+ elif row[column].endswith(".tld"):
+ logger.debug("row[%s]='%s' is a fake domain - SKIPPED!", column, row[column])
+ continue
punycode = domain_helper.encode_idna(row[column])
logger.debug("punycode='%s',row[%s]='%s'", punycode, column, row[column])