Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug logging multiple IPs to email body #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions SMTPTester.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def external_test(smtp_targets, port, fromaddr, recipient, data, subject, debug)
for target in smtp_targets:
LOGGER.info("[*] Checking host " + target + ':' + str(port))
LOGGER.info("[*] Testing for mail relaying (external)")
data += "\nVulnerable server is: %s" % target
tgt_server = "\n\n\nVulnerable server is: %s" % target
try:
if fromaddr and recipient: # checking we have both to and from addresses
with SMTP(target, port) as current_target:
Expand All @@ -110,7 +110,7 @@ def external_test(smtp_targets, port, fromaddr, recipient, data, subject, debug)
# message["Bcc"] = receiver_email # Recommended for mass emails

# Add body to email
message.attach(MIMEText(data, "plain"))
message.attach(MIMEText(data + tgt_server, "plain"))

# # Open PDF file in binary mode
# with open(attachment, "rb") as attached:
Expand Down