From 77c3f55567777c2c5852c526d8a7f2485e4b2db8 Mon Sep 17 00:00:00 2001 From: Felipe Molina <846513+felmoltor@users.noreply.github.com> Date: Tue, 10 Sep 2024 22:52:27 +0200 Subject: [PATCH] Fix bug in taint_html_part and inject_attachment_message_plain --- Maitm/Maitm.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Maitm/Maitm.py b/Maitm/Maitm.py index 0af9091..345f086 100644 --- a/Maitm/Maitm.py +++ b/Maitm/Maitm.py @@ -347,12 +347,12 @@ def insert_unc_path_html(self,id,html: bytes,charset=None): Inject attachment message on plaintext content """ def inject_attachment_message_plain(self,content: str,charset=None): - if ("attachments" in self.config["injections"].keys() and "attachment_message" in self.config["injections"]["attachments"].keys()): + if (self.attachment is not None and self.attachment_message is not None): content=self.config["injections"]["attachments"]["attachment_message"]+"\n\n"+content - return content else: self.logger.debug("No attachment message to inject in the email.") - return None + + return content """ @@ -764,6 +764,7 @@ def taint_html_part(self, part, id): target_html=target_html.replace('\xa0',' ') # Insert the tracking pixel + tainted_html_bytes = target_html_bytes if (self.tracking_url is not None): tainted_html_bytes=self.insert_tracking_pixel_html(id,target_html_bytes,charset=charset) # Insert the UNC path