From dca06c85f455a93db509b0f61f5228c5b910be38 Mon Sep 17 00:00:00 2001 From: Chris Schmidt Date: Sun, 14 Jul 2024 21:19:57 -0600 Subject: [PATCH] Fixed replace bug Fixed a bug for passing bytes to the replace function insteas of a string --- src/phishing/smtp/client/smtp_web.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/phishing/smtp/client/smtp_web.py b/src/phishing/smtp/client/smtp_web.py index 1ac2cca7a..75a99c8a3 100644 --- a/src/phishing/smtp/client/smtp_web.py +++ b/src/phishing/smtp/client/smtp_web.py @@ -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)