Mailing List Archive

Getting VALUE from get_kb_item
I'm working on getting KB information from a plugin.

The KB item is (HTTP/application, value: version)

So I set_kb_item(HTTP/application, value: version).

The problem is get_kb_item(HTTP/application) will get me the KB item, but how to do I get the version information to use from this kb item?

Thanks!
--
It is proverbial that from (\`--/') _ _______ .-r-.
a hungry tiger and an >.~.\ `` ` `,`,`. ,'_'~`.
affectionate woman there is (v_," ; `,-\ ; : ; \/,-~) \
no escape. -Ernest Bramah `--'_..),-/ ' ' '_.>-' )`.`.__.')
hobbes at vaxer dot net ((,((,__..'~~~~~~((,__..' `-..-'fL
_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers
Re: Getting VALUE from get_kb_item [ In reply to ]
On Wed, 15 Mar 2006, HObbES wrote:

> I'm working on getting KB information from a plugin.
>
> The KB item is (HTTP/application, value: version)
>
> So I set_kb_item(HTTP/application, value: version).
>
> The problem is get_kb_item(HTTP/application) will get me the KB item, but how to do I get the version information to use from this kb item?

Try (where 1.3.4 is the value of HTTP/application):

set_kb_item(name:"HTTP/application", value:"1.3.4");
ver = get_kb_item("HTTP/application");
display("ver [", ver, "]\n");

--
- Josh
_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers