Files
metasploit-gs/data/john/run.linux.x86.any/ldif2pw.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

26 lines
453 B
Perl
Executable File

#!/usr/bin/perl
$i=1;
while(<>) {
chomp;
if(/^$/) {
if($object{"uid"} ne "") {
print $object{"uid"}.":";
print $object{"userPassword"} ne "" ? $object{"userPassword"} : "*";
print ":";
print $i.":";
print $i.":";
print $object{"cn"}.":";
print $object{"homeDirectory"} ne "" ? $object{"homeDirectory"} : "/";
print ":/bin/sh\n";
}
%object = ();
$i++;
next;
}
($lhs, $rhs) = split(/: /);
$object{$lhs} = $rhs;
}