From: Roland Häder Date: Mon, 11 Dec 2023 06:57:39 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=42bb9c8efd46c4fb2184a137bed0f0d488ec0a5b;p=fba.git Continued: - also check blacklist first, before invoking instances.is_recent() --- diff --git a/fba/commands.py b/fba/commands.py index 8ae5722..2d26357 100644 --- a/fba/commands.py +++ b/fba/commands.py @@ -1272,11 +1272,11 @@ def recheck_obfuscation(args: argparse.Namespace) -> int: logger.info("Checking %d domains ...", len(rows)) for row in rows: logger.debug("Fetching peers from domain='%s',software='%s',nodeinfo_url='%s' ...", row["domain"], row["software"], row["nodeinfo_url"]) - if (args.force is None or not args.force) and args.domain is None and args.software is None and instances.is_recent(row["domain"], "last_blocked"): - logger.debug("row[domain]='%s' has been recently checked, args.force[]='%s' - SKIPPED!", row["domain"], type(args.force)) + if blacklist.is_blacklisted(row["domain"]): + logger.debug("row[domain]='%s' is blacklisted - SKIPPED!", row["domain"]) continue - elif blacklist.is_blacklisted(row["domain"]): - logger.warning("row[domain]='%s' is blacklisted - SKIPPED!", row["domain"]) + elif (args.force is None or not args.force) and args.domain is None and args.software is None and instances.is_recent(row["domain"], "last_blocked"): + logger.debug("row[domain]='%s' has been recently checked, args.force[]='%s' - SKIPPED!", row["domain"], type(args.force)) continue logger.debug("Invoking federation.fetch_blocks(%s) ...", row["domain"]) diff --git a/fba/helpers/processing.py b/fba/helpers/processing.py index d0df8aa..07e9371 100644 --- a/fba/helpers/processing.py +++ b/fba/helpers/processing.py @@ -226,7 +226,7 @@ def csv_block(blocker: str, url: str, command: str): logger.debug("domain='%s' is not a valid domain - SKIPPED!") continue elif blacklist.is_blacklisted(domain): - logger.warning("domain='%s' is blacklisted - SKIPPED!", domain) + logger.debug("domain='%s' is blacklisted - SKIPPED!", domain) continue elif blocks.is_instance_blocked(blocker, domain, severity): logger.debug("blocker='%s' has already blocked domain='%s' with severity='%s' - SKIPPED!", blocker, domain, severity)