From 51a8552beaddb5b321ac250a4d1be57dacbf1179 Mon Sep 17 00:00:00 2001 From: Sascha Rommelfangen Date: Tue, 30 May 2017 12:27:49 +0200 Subject: [PATCH] remove Fwd: from mail subject --- mail_to_misp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mail_to_misp.py b/mail_to_misp.py index f6c2a81..f555b41 100755 --- a/mail_to_misp.py +++ b/mail_to_misp.py @@ -104,10 +104,12 @@ email_data = re.sub(b".*Domain Status: .*\n?",b"", email_data) email_data = re.sub(b".*Registrant Email: .*\n?",b"", email_data) email_data = re.sub(b".*IP Location: .*\n?",b"", email_data) -# Remove tags from subject +# Remove "[tags]" from subject email_subject = re.sub(b"[\(\[].*?[\)\]]", b"", email_subject) # Remove "Re: " from subject email_subject = re.sub(b"Re: ", b"", email_subject) +# Remove "Fwd: " from subject +email_subject = re.sub(b"Fwd: ", b"", email_subject) def init(url, key):