TLDRBins TLDRBins / SMTP


Usage Tips:

  • Click on a keyword to enable inline editing.
  • Click inside a code block to copy (excludes comments).
  • Use the button to view examples.
  • Click outside to collapse all examples.

Simple Mail Debugging Server

#!/usr/bin/env python3 import aiosmtpd.controller class CustomSMTPHandler: async def handle_DATA(self, server, session, envelope): print(f"[+] Received a mail.") print("=" * 50) print(envelope.content.decode()) print("=" * 50) return "250 OK" handler = CustomSMTPHandler() server = aiosmtpd.controller.Controller(handler, hostname="0.0.0.0", port=25) server.start() print("[*] Listening on 0.0.0.0:25") input("[*] Server started. Press Return to quit.\n") server.stop()
Sample Output: TO-DO

Users Enum

nmap -p 25 --script=smtp-enum-users <TARGET>
Sample Output: TO-DO
# Use RCPT smtp-user-enum -M RCPT -U /usr/share/seclists/Usernames/cirt-default-usernames.txt -t <TARGET>
Sample Output: TO-DO
# Use VRFY smtp-user-enum -M VRFY -U /usr/share/seclists/Usernames/cirt-default-usernames.txt -t <TARGET>
Sample Output: TO-DO

Ref: smtp-user-enum.pl