This quick & dirty script will show you which plugins are currently
running.

BUGS
It only works with one connected user at a time.

#!/usr/bin/perl -w
# Copyright 2002 Michel Arboi <[EMAIL PROTECTED]>

my $prefix="/opt/nessus";
my $var = $prefix . "/var/nessus";
my $fname = $var . "/logs/nessusd.messages";

open (F, "<" . $fname) or die "$fname: $!";

%r = ();

while (<F>) {
  if (/ launching (\S+) against \S+ \[(\d+)\]/) { $r{$2} = $1; }
  elsif (/ (\S+) \(process (\d+)\) finished /) { undef $r{$2}; }
  elsif (/ (\S+) \(pid (\d+)\) .* killing it/) { undef $r{$2}; }
  elsif (/ test complete| nessusd .* started /) { %r = (); }
}

foreach $k (keys %r) {
  if (defined $r{$k}) {  print $r{$k} . "\n"; }
}

Reply via email to