EmailNuker-Server
This project is a Python script that can be used to send multiple emails to a specified email address using multiple Gmail accounts (via OAuth2 authentication). It is designed to be run in a Docker container.
Instructions
Adding Accounts into the Bomber:
Run the add_account.py
script.
A new JSON file will be created in the accounts-public folder. This file contains the OAuth2 client secret for a new Gmail account. Have a look at this documentation for Oauth2 : https://blog.macuyiko.com/post/2016/how-to-send-html-mails-with-oauth2-and-gmail-in-python.html
Add this file to the accounts-public
folder and rename it with a unique name.
The new account will automatically be added to the list of accounts available for sending emails.
Full Setup :
Install Docker on your machine.
curl -fsSL https://get.docker.com -o get-docker.sh | sh get-docker.sh
Clone or download the project from the repository.
git clone https://github.com/bagarrattaa/emailnuker-server
Navigate to the project folder in your terminal.
cd emailnuker-server
Build the Docker image using the following command:
docker build -t <image-name> .
Replace with a name of your choice.
Once the image is built, run the Docker container with the following command:
docker run -p <host-port>:80 -v <accounts-folder>:/data/accounts-public -v <protected-folder>:/data/protected -d <image-name>
- Replace with the port number you want the application to run on.
- Replace with the path to the folder containing the JSON files for the Gmail accounts
- Replace with the path to the folder containing the list of protected email addresses (one email address per file).
The application should now be running. You can send a POST request to the /send
endpoint with the following parameters:
{
"to": "<recipient-email>",
"sub": "<email-subject>",
"msg": "<email-body>",
"access": "public"
}
- Replace with the email address you want to send the email to
- Replace with the subject of the email
- Replace with the body of the email.
You can also change the access key (in this case, "public") to another key that you have set up in the keylist dictionary in bomber2.py
.
Example
curl request:
curl -X POST -H "Content-Type: application/json" -d '{"to":"example@example.com", "sub":"test email", "msg":"this is a test email", "access":"public"}' http://localhost:<host-port>/send
You can also use the /config
endpoint to get the IP address of the Docker container:
http://localhost:<host-port>/config
To add more Gmail accounts to the application, repeat the steps outlined in the "Adding Accounts into the Bomber" section.
Disclamer
This script is meant for educational and testing purposes only. Sending unsolicited emails or spam is illegal and should not be done. The developer is not responsible for any misuse of this script.