From 626be7bc34022009a6f2082716988e005a699615 Mon Sep 17 00:00:00 2001 From: DemonWareXT Date: Tue, 31 May 2022 17:16:48 +0200 Subject: [PATCH] changed initialisation of variable --- scripts/reactutils.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/reactutils.py b/scripts/reactutils.py index 933620cc..8689c693 100755 --- a/scripts/reactutils.py +++ b/scripts/reactutils.py @@ -459,11 +459,15 @@ def push_to_confluence(data, apipath, auth): @staticmethod - def normalize_react_title(title,fmtrules={"abbreviations": ["ip", "dns", "ms", "ngfw", "ips", "url", "pe", "pdf","elf", "dhcp", "vpn", "smb", "ftp", "http"],"capitalizeWords":["unix", "windows", "proxy", "firewall", "mach-o"]}): + def normalize_react_title(title, fmtrules=None): """Normalize title if it is a RA/RP title in the following format: RP_0003_identification_make_sure_email_is_a_phishing """ - + + if fmtrules is None: + fmtrules = { + "abbreviations": ["ip", "dns", "ms", "ngfw", "ips", "url", "pe", "pdf", "elf", "dhcp", "vpn", "smb", + "ftp", "http"], "capitalizeWords": ["unix", "windows", "proxy", "firewall", "mach-o"]} react_id_re = re.compile(r'R[AP]_\d{4}_.*$') if react_id_re.match(title): title = title[8:].split('_', 0)[-1].replace('_', ' ').capitalize()