-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapp.js
60 lines (55 loc) · 2.4 KB
/
app.js
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
55
56
57
58
59
#!/usr/bin/node
// made by prince kumar
// date 23 sep 2022
// all import goes here
const process = require("process");
const fs = require('fs');
const prompt = require("prompt-sync")();
//make a function for banner
function banner(){
process.stdout.write("\033[31;1m ");
process.stdout.write(`
███╗ ███╗██╗ ██╗██╗ ████████╗██╗ ██╗ ██████╗ ███╗ ███╗
████╗ ████║██║ ██║██║ ╚══██╔══╝██║ ██║██╔════╝ ████╗ ████║
██╔████╔██║██║ ██║██║ ██║ ██║ ██║██║ ███╗██╔████╔██║
██║╚██╔╝██║██║ ██║██║ ██║ ██║ ██║██║ ██║██║╚██╔╝██║
██║ ╚═╝ ██║╚██████╔╝███████╗██║ ╚██████╔╝╚██████╔╝██║ ╚═╝ ██║
╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝
`);
}
// take a input from the user ..
// create a function to check for the valid gmail address
function checkG(gmail){
var regX = /[a-zA-Z0-9]@gmail.com/gm;
var res = gmail.match(regX);
if(res){
return true;
}
else{
return false;
}
}
banner();
let gMail = prompt("[~] Enter a gmail: " );
if (checkG(gMail)){
// ask the user , how many mailt they want ..
let count = prompt("[~] Enter the number of mail you want? ");
// lets open the file. . .. ...
const data = fs.readFileSync('./optn.txt',
{encoding:'utf8', flag:'r'});
var dataA = data.split("\n");
if (dataA.length < count){
console.log("Please provide a small number");
}
else{
for(let i = 0; i< count; i++){
var gmailA = gMail.split("@");
// make mass mail here
console.log("");
console.log(`${gmailA[0]}+${dataA[i].trim()}@${gmailA[1]}`);
}
}
}
else{
console.log("Please provide a valid gmail");
}