GithubHelp home page GithubHelp logo

res-labo-smtp's Introduction

Client SMTP for Pranks :D

Author: Joshua Gomes da Costa & Michaël da Silva

Description

This Java application allows you to play pranks on a list of victims. Via a list of victims you provide (MailPoolAddress.txt), the group size you want, the SMTP server address and the port (Config.txt), the application will send premaid messages (Pranks.txt) without them knowing you did that.

Mock SMTP server

Perhaps before using this client into a real server and be blacklisted you want to experiment and see how our app works. To do that we provided a mock SMTP server, a "fake" SMTP server which allows you to see the emails created by the client.

The mock server we chose is the MockMock Server. It is simple to use and has a web interface to see the fake emails sent. To use the MockMock server, you just need to use the following command (where the .jar is):

java -jar MockMock.jar

If you have Docker installed, you can build and run the MockMock.jar in the Docker directory. To start the MockMock server type the following command:

docker build -t mockmockserver .
This command will build your container with the DockerFile in the directory

docker run -p 8282:8282 -p 2525:2525 -t mockmockserver
This final command starts the server with the correct ports opened.

You can test the mock server via the command telnet localhost 2525 to interact with it and go to http://localhost:8282 for the web interface. Follow the RFC 5321 Verifying and Sending Scenario example to "send" your first email to the MockMock server.

Client SMTP

For the SMTP client , first you have to create the .jar of the application. To do that, go to the directory where the repository is and write the following command:

mvn clean install
This command requires maven to be installed. When the message BUILD SUCCESS is displayed, then the app is ready to start. Go to the directory target and launch the command java -jar ClientSMTP-1.0-SNAPSHOT-standalone.jar (after the server is up).

If you want to change the email addresses used, you can change them in the file MailPoolAdress.txt. If you want to change the pranks sent to the victims, then go to the Pranks.txt file. Finally, if you want to change the SMTP server address or the port or the size of the groups of victims used for the client, you have to modify the file Config.txt. Watch out that the group size has to be lower than the total number of email address available (obviously).

All files are in the src/resources directory.

Implementation of the app

The central object is the unique instance of mailSender. We can get the instance with getInstance() and initialise it with initialise() (who needs 3 File: one for the list of mails, one for the list of prank and the last one to configure the server address and the ClientSMTP). The method send() use generateGroups() and select a prank and prepare a object Mail(implement the following attributes : From,to,cc,subject,body) with these informations, then use sendMail from his ClientSMTP attribute.

the ClientSMTP class use Socket, BufferedReader and PrintWriter for the communication with the server, the method sendMail() send the informations of the mail received in argument to the server.

Structure of the ClientSMTP application

communication_client_server

SMTP Protocol

structure_application

res-labo-smtp's People

Contributors

joshuagomesdacosta avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.