From a02b13cdc2003f46a9475967466d842a4b111a9e Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Tue, 8 Feb 2022 12:58:04 -0500 Subject: [PATCH] Island: Fix logic error in ConfigService The ConfigService would only translate the old fingerprinter names to the new names if HTTPFinger was enabled. This change rectifies the issue. --- monkey/monkey_island/cc/services/config.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/monkey/monkey_island/cc/services/config.py b/monkey/monkey_island/cc/services/config.py index f113c437e..f892801d2 100644 --- a/monkey/monkey_island/cc/services/config.py +++ b/monkey/monkey_island/cc/services/config.py @@ -545,12 +545,11 @@ class ConfigService: {"name": f, "options": {}} for f in sorted(config[flat_fingerprinter_classes_field]) ] - if "HTTPFinger" in config[flat_fingerprinter_classes_field]: - for fp in formatted_fingerprinters: - if fp["name"] == "HTTPFinger": - fp["options"] = {"http_ports": sorted(config[flat_http_ports_field])} + for fp in formatted_fingerprinters: + if fp["name"] == "HTTPFinger": + fp["options"] = {"http_ports": sorted(config[flat_http_ports_field])} - fp["name"] = ConfigService._translate_fingerprinter_name(fp["name"]) + fp["name"] = ConfigService._translate_fingerprinter_name(fp["name"]) config.pop(flat_fingerprinter_classes_field) return formatted_fingerprinters