#!/usr/bin/perl5.8.4

# bin/dns-chk.sara
#
# Last Mod 16 Aug 05, 12:00:00 by Bob Todd
#
require 'config/paths.pl';
require 'config/sara.cf';
require 'perl/misc.pl';
require 'perllib/getopts.pl';

$service_output = "";
$printed        = "";

&Getopts("v");
if ($#ARGV < 0) {
   die "Usage: bin/pnp.sara hostname\n";
}
$target = $ARGV[0];
$args = "$target $bindport";
  open (PNP, "bin/pnp $args |");
  while(<PNP>) {
    chomp;
     if (/shell/ && /Vulnerable/) {
         $sid = "PNP-001";
         ($severity,$service_output,$text,$cve) = &get_sid($sid);
         $text =~ s/\n//;
         $status = "a";
         $trustee = "ANY\@$target";
         $trusted = "ANY\@$target";
         &sara_print();
         $printed = "YES";
     }
  }
close (PNP);   


