From a275c7d2091e905761f8b3e0a019a370b2f2a92e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 8 Dec 2023 23:28:48 +0100 Subject: [PATCH] Continued: - also search for instances with detected software --- fba/boot.py | 1 + fba/commands.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/fba/boot.py b/fba/boot.py index 93d4546..2ffdf16 100644 --- a/fba/boot.py +++ b/fba/boot.py @@ -226,6 +226,7 @@ def init_parser(): parser.add_argument("--no-software", action="store_true", help="Checks only entries with no software type detected.") parser.add_argument("--no-auto", action="store_true", help="Checks only entries with other than AUTO_DISCOVERY as detection mode.") parser.add_argument("--no-detection", action="store_true", help="Checks only entries with no detection mode set.") + parser.add_argument("--with-software", action="store_true", help="Checks only entries with any software type detected.") ### Fetch instances from instances.social ### parser = subparser_command.add_parser( diff --git a/fba/commands.py b/fba/commands.py index 8027683..ef8ee42 100644 --- a/fba/commands.py +++ b/fba/commands.py @@ -1489,6 +1489,9 @@ def update_nodeinfo(args: argparse.Namespace) -> int: elif args.no_software: logger.info("Fetching domains with no software type detected ...") database.cursor.execute("SELECT domain, software FROM instances WHERE software IS NULL ORDER BY last_updated ASC") + elif args.with_software: + logger.info("Fetching domains with any software type detected ...") + database.cursor.execute("SELECT domain, software FROM instances WHERE software IS NOT NULL ORDER BY last_updated ASC") elif args.no_auto: logger.info("Fetching domains with other detection mode than AUTO_DISOVERY being set ...") database.cursor.execute("SELECT domain, software FROM instances WHERE detection_mode IS NOT NULL AND detection_mode != 'AUTO_DISCOVERY' ORDER BY last_updated ASC") -- 2.39.5