Files
metasploit-gs/data/john/run.linux.x86.any/sha-dump.pl
T
HD Moore a4ea859a4f Check in a snapshot of jtr
git-svn-id: file:///home/svn/framework3/trunk@13135 4d416f70-5f16-0410-b530-b9f4589650da
2011-07-09 02:11:54 +00:00

24 lines
526 B
Perl
Executable File

#!/usr/bin/perl
use Net::LDAP;
$server = $ARGV[0];
$password = $ARGV[1];
$ldap = Net::LDAP->new($server) || die "$@";
$ldap->bind("cn=Directory Manager", password => $password) || die "$@";
$search = $ldap->search(base => "o=test",
scope => "subtree",
filter => "(uid=*)");
$search->code && die $search->error;
$i=0;
foreach $user ($search->all_entries) {
@uid=$user->get("uid");
@pass=$user->get("userpassword");
print $uid[0].":".$pass[0].":".
$i.":".$i.":/".$uid[0].":\n";
}
$ldap->unbind();