Is it possible to have a plugin run just once for the entire scan and
set some kind of variable for use by all plugins on all hosts?
I'm trying to write a plugin that will download the three most recent
virus definition dates from Symantec (I know 21725 checks whether
signatures are current, but I'm trying to write a smallish nessus-based
audit tool for my system administrators that will run inside
vmware-player machine and will not depend on a plugin feed).
Here's a snippet from plugin (which works):
argv[0] = "curl";
argv[1] = "http://definitions.symantec.com/defs/
<http://definitions.symantec.com/defs/> ";
results = pread(cmd: "curl", argv: argv, nice: 5);
foreach line ( split( results) ) {
match = eregmatch( string: line, pattern:
'([0-9]{8})-[0-9]{3}-i32.exe', icase: TRUE );
if( !isnull( match ) ) signature += match[1] + ' ';
}
The trick is to have the above plugin pull the current definition list
from symantec only once and put the values in a preference (versus in
the KB) for use by all plugins on all hosts. (Another plugin, which
will run for each target host, will simply take the current signature
version from the registry and check whether it's in this list.)
I'm thinking that setting the script_category to 'ACT_INIT' will do
this. Is that correct?
John Scherff
Sr. IT Security Engineer
24 Hour Fitness
_______________________________________________
Nessus mailing list
[email protected]
http://mail.nessus.org/mailman/listinfo/nessus