-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathBreacher.cpp
90 lines (84 loc) · 4.24 KB
/
Breacher.cpp
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
#include "modules/Breacher.h"
#include "lib/includes.h"
#include "lib/termcolor.hpp"
#include "src/netCurl.h"
using namespace termcolor;
void Breacher::openFile(std::string path)
{
std::ifstream myfile (path); // Открытие файла
if (myfile.is_open()){
while (!myfile.eof() )
{
getline (myfile,line); // Считывание строки
array[loop] = line; // Запись её в массив
loop++;
}
myfile.close();
}
}
void Breacher::setDomian(std::string domian)
{
this->domian = domian;
}
void Breacher::setSec(std::string Secure)
{
this->Secure = Secure + "://";
}
void Breacher::mainMenu()
{
for (int a = 0; a < loop; a++) {
switch (ResponseCode(Secure + domian + array[a])) {
case 404:
std::cout << bold << red << " [-] " << reset << Secure + domian + array[a] << bold << blue << " | " << red << "404 Not Found\n" << reset;
break;
case 403:
std::cout << bold << red << " [-] " << reset << Secure + domian + array[a] << bold << blue << " | " << red << "403 Forbidden\n" << reset;
break;
case 500:
std::cout << bold << red << " [-] " << reset << Secure + domian + array[a] << bold << blue << " | " << red << "500 Internet Server Error\n" << reset;
break;
case 502:
std::cout << bold << red << " [-] " << reset << Secure + domian + array[a] << bold << blue << " | " << red << "502 Bad Gateway\n" << reset;
break;
case 503:
std::cout << bold << red << " [-] " << reset << Secure + domian + array[a] << bold << blue << " | " << red << "503 Service Unavailable\n" << reset;
break;
case 504:
std::cout << bold << red << " [-] " << reset << Secure + domian + array[a] << bold << blue << " | " << red << "504 Gateway Timeout\n" << reset;
break;
case 301:
std::cout << bold << yellow << " [/] " << reset << Secure + domian + array[a] << bold << blue << " | " << yellow << "301 Moved Permanently\n" << reset;
break;
case 200:
std::cout << bold << green << " [+] " << reset << Secure + domian + array[a] << bold << blue << " | " << green << "200 OK\n" << reset;
break;
case 201:
std::cout << bold << green << " [+] " << reset << Secure + domian + array[a] << bold << blue << " | " << green << "201 Created\n" << reset;
break;
case 202:
std::cout << bold << green << " [+] " << reset << Secure + domian + array[a] << bold << blue << " | " << green << "202 Accepted\n" << reset;
break;
case 203:
std::cout << bold << green << " [+] " << reset << Secure + domian + array[a] << bold << blue << " | " << green << "203 Non-Authoritative Information\n" << reset;
break;
case 204:
std::cout << bold << green << " [+] " << reset << Secure + domian + array[a] << bold << blue << " | " << green << "204 No Content\n" << reset;
break;
case 206:
std::cout << bold << green << " [+] " << reset << Secure + domian + array[a] << bold << blue << " | " << green << "206 Partial Content\n" << reset;
break;
case 304:
std::cout << bold << red << " [-] " << reset << Secure + domian + array[a] << bold << blue << " | " << red << "304 Not Modified\n" << reset;
break;
case 302:
std::cout << bold << green << " [/] " << reset << Secure + domian + array[a] << bold << blue << " | " << green << "302 Found\n" << reset;
break;
case 205:
std::cout << bold << green << " [+] " << reset << Secure + domian + array[a] << bold << blue << " | " << green << "205 Reset Content\n" << reset;
break;
default:
std::cout << bold << yellow << " [/] " << reset << Secure + domian + array[a] << bold << blue << " | " << yellow << "Code Not Found\n" << reset;
break;
}
}
}