From 09938b2bf3b4c55127be283d5010da160ccb58f0 Mon Sep 17 00:00:00 2001 From: "Mariusz B. / mgeeky" Date: Wed, 30 Mar 2022 16:24:24 +0200 Subject: [PATCH] Attempted to fix issues/6 --- decode-spam-headers.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/decode-spam-headers.py b/decode-spam-headers.py index ff290c1..735e93d 100644 --- a/decode-spam-headers.py +++ b/decode-spam-headers.py @@ -4387,9 +4387,15 @@ Src: https://www.cisco.com/c/en/us/td/docs/security/esa/esa11-1/user_guide/b_ESA m = re.search(r'?', value) domain = '' + if not m: + return [] + if m and len(self.received_path) < 3: return [] + if len(m.groups()) < 2: + return [] + username = m.group(1) domain = m.group(2) email = f'{username}@{domain}'