Skip to content

Commit

Permalink
Fix bug in taint_html_part and inject_attachment_message_plain
Browse files Browse the repository at this point in the history
  • Loading branch information
felmoltor committed Sep 10, 2024
1 parent 32641df commit 77c3f55
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Maitm/Maitm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


"""
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 77c3f55

Please sign in to comment.