Skip to content

Commit

Permalink
Fixed replace bug
Browse files Browse the repository at this point in the history
Fixed a bug for passing bytes to the replace function insteas of a string
  • Loading branch information
chrisisbeef authored Jul 15, 2024
1 parent 884a24e commit dca06c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 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 Down

0 comments on commit dca06c8

Please sign in to comment.