From f615020e6ebfbe1e2fc00ba04145dd1af24268f5 Mon Sep 17 00:00:00 2001 From: ITSEC-DACHSER <50357205+ITSEC-DACHSER@users.noreply.github.com> Date: Tue, 9 Jul 2024 11:18:28 +0200 Subject: [PATCH] Change: create_task optional argument name Added an optional argument to the function create_task to adjust the name --- scripts/scan-new-system.gmp.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/scan-new-system.gmp.py b/scripts/scan-new-system.gmp.py index 12098a2a..e059a05d 100644 --- a/scripts/scan-new-system.gmp.py +++ b/scripts/scan-new-system.gmp.py @@ -41,8 +41,11 @@ def create_target(gmp, ipaddress, port_list_id): return response.get("id") -def create_task(gmp, ipaddress, target_id, scan_config_id, scanner_id): - name = f"Scan Suspect Host {ipaddress}" +def create_task(gmp, ipaddress, target_id, scan_config_id, scanner_id, name="Scan Suspect Host"): + if name == "Scan Suspect Host": + name = f"Scan Suspect Host {ipaddress}" + else: + name = f"{name}" response = gmp.create_task( name=name, config_id=scan_config_id,