From: Roland Häder Date: Thu, 22 Feb 2024 23:38:57 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=673b59adca4ca81f60ff62c214899c9ca33097cf;p=fba.git Continued: - more pre-checks to avoid exceptions - don't abuse catching them here as a control statement (if) --- diff --git a/fba/commands.py b/fba/commands.py index 0e65f6e..66c36c6 100644 --- a/fba/commands.py +++ b/fba/commands.py @@ -1542,7 +1542,19 @@ def update_nodeinfo(args: argparse.Namespace) -> int: cnt = 0 for row in domains: logger.debug("row[]='%s'", type(row)) - if blacklist.is_blacklisted(row["domain"]): + if row["domain"].endswith(".i2p") and not config.get("allow_i2p_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"]) + continue + elif row["domain"].endswith(".arpa"): + 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"]) + continue + elif blacklist.is_blacklisted(row["domain"]): logger.debug("row[domain]='%s' is blacklisted - SKIPPED!", row["domain"]) continue elif not args.force and instances.is_recent(row["domain"], "last_nodeinfo"):