Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

37 lines
745 B

# info.pl - works with output of sds info ...
# ($server, $root) = ($1, $2);
# map({print $_ . "\n"} (@buf, "", @sorted));
# make sure we passed an input file.
# open the file and get the data
my @buf = ();
my ($server, $root);
open(F, $ARGV[0]) or die "You must specify an input file.\n";
@lines = <F>;
close(F);
for (@lines)
{
if (/Client root\: (.*)/) {
$root=$1;
(!defined $server) or die "this sucks";
} elsif (/Server address\: (.*)/) {
$server=$1;
(defined $root) or die "we need root";
push @buf, "$root\=$server";
undef $root;
undef $server;
}
}
@sorted = sort {$b cmp $a} @buf;
map({print $_ . "\n"} (@sorted));
end: