Skip to content

Commit

Permalink
Merge pull request #1085 from chrisisbeef/patch-2
Browse files Browse the repository at this point in the history
Fixed replace bug
  • Loading branch information
HackingDave authored Sep 9, 2024
2 parents 884a24e + 56e11f1 commit e6fe8af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/phishing/smtp/client/smtp_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ def mail(to, subject, prioflag1, prioflag2, text):
# if we specify to track users, this will replace the INSERTUSERHERE with
# the "TO" field.
if track_email.lower() == "on":
body_new = body_new.replace("INSERTUSERHERE", base64.b64encode(to.encode()))
body_new = body_new.replace("INSERTUSERHERE", str(base64.b64encode(to.encode())))
# call the function to send email
try:
mail(to, subject, prioflag1, prioflag2, body_new)
Expand All @@ -505,7 +505,7 @@ def mail(to, subject, prioflag1, prioflag2, text):
# if we specify to track users, this will replace the INSERTUSERHERE
# with the "TO" field.
if track_email.lower() == "on":
body_new = body_new.replace("INSERTUSERHERE", base64.b64encode(to.encode()))
body_new = body_new.replace("INSERTUSERHERE", str(base64.b64encode(to.encode())))
# send the actual email
time_delay = check_config("TIME_DELAY_EMAIL=").lower()
time.sleep(int(time_delay))
Expand Down

0 comments on commit e6fe8af

Please sign in to comment.