Skip to content

Python Based script for ethical email spoofing, used primarily for security testing and educational purposes. πŸ”’πŸ“š

License

Notifications You must be signed in to change notification settings

4nuxd/email-spoofer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Email Spoofer - Python Based SMTP Mailer πŸ“§πŸ’»

Overview 🌐

This is a Python-based SMTP mailer tool designed for educational purposes. It allows you to send spoofed emails through an SMTP server by providing the necessary SMTP configuration (server, port, login, password) and email details (from address, to address, subject, message). The script supports both plain text and HTML email content.

Version: 1.0.1

Author: Noob Pirate aka Blionrie πŸ΄β€β˜ οΈ

Features ✨

  • Send spoofed emails using any SMTP server (e.g., Gmail, Yahoo, etc.)
  • Option to include HTML content in the email πŸ“
  • Logs all sent emails to a file for record-keeping πŸ“‚
  • Handles common SMTP errors (authentication, connection issues, etc.) ⚠️
  • Simple CLI interface with color-coded outputs for success and error messages 🎨

Requirements πŸ› οΈ

  • Python 3.x
  • termcolor and colorama for colored terminal output 🎨
  • smtplib for sending emails (usually comes with Python by default)

Required Python Modules πŸ“¦

  • termcolor
  • colorama
  • smtplib (usually included in Python)

Installation πŸš€

Install Required Modules

Before using the tool, make sure the necessary Python modules are installed. You can install them using the following commands:

pip install termcolor colorama

The script automatically installs missing modules when executed. πŸ”§

Usage πŸ’‘

1. Clone or Download the Script πŸ“₯

Clone this repository or download the script spoofer.py.

2. Prepare HTML Content (Optional) πŸ–₯️

If you wish to send an HTML email, create an HTML file called msg.html in the same directory as the script. The script will automatically read this file when prompted to send HTML content. Example:

<!-- msg.html -->
<html>
  <body>
    <h1>This is a spoofed email!</h1>
    <p>This is the HTML content of the email.</p>
  </body>
</html>

3. Run the Script πŸƒ

Execute the script from the terminal or command prompt:

python spoofer.py

The script will prompt you for the following inputs:

  • SMTP Server: The SMTP server address (e.g., smtp.gmail.com).
  • SMTP Port: The SMTP port number (commonly 25, 465, or 587).
  • SMTP Username: Your email or username used to authenticate with the SMTP server.
  • SMTP Password: Your SMTP password (input will be hidden).
  • From Address: The email address you want to spoof.
  • To Address: The recipient email address.
  • Subject: The subject of the email.
  • Message: The plain text body of the email.
  • HTML Content: Choose whether to include HTML content. If you answer yes, the script will automatically look for email_content.html in the same directory.

Example:

SMTP Server (e.g., smtp.gmail.com): smtp.gmail.com
SMTP Port (e.g., 587): 587
Your SMTP Username (can be email or username): [email protected]
Your SMTP Password: ********
Spoofed 'From' Address (e.g., [email protected]): [email protected]
Recipient Email Address: [email protected]
Email Subject: Test Email
Email Message (plain text): This is a test email.
Do you want to include HTML content? (yes/no): yes

4. Email Logging πŸ““

The script logs all sent emails in a file called email_log.txt in the current directory. Each log entry includes the time, sender, recipient, subject, and message content.

Troubleshooting ⚠️

  • Authentication Failed: Ensure your SMTP username and password are correct. πŸ”‘
  • Connection Error: Verify the SMTP server address and port. 🌐
  • HTML File Missing: If you choose to include HTML content but don't have an email_content.html file in the same directory, the script will notify you. πŸ“„

Disclaimer 🚨

This tool is intended for educational purposes only. Please do not use it for malicious activities or spam. Always ensure you have permission before sending emails on behalf of others. βš–οΈ

License πŸ“

This project is licensed under the MIT License - see the LICENSE file for details.

About

Python Based script for ethical email spoofing, used primarily for security testing and educational purposes. πŸ”’πŸ“š

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published