Mailing List Archive

How to debug the plugin
Generally how do you guys debug a plugin? The 'nasl' command seems not
always helpful if a plugin depends on others such as find_service.

P.S. What is the use of 'display' function inside a plugin? Where does the
text go? nessusd.messages? saved knowledge base? or the final reports?

Thanks!

Fred

_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers
Re: How to debug the plugin [ In reply to ]
On Aug 2, 2008, at 12:26 PM, Fred Qiu wrote:

> Generally how do you guys debug a plugin? The 'nasl' command seems not
> always helpful if a plugin depends on others such as find_service.

One approach is to add calls to display output at key places in the
script. display() does this unconditionally; debug_print(), which is
declared in global_settings.inc, does it conditionally so you can turn
off debugging; and dump(), declared in dump.inc, does it in a format
that's useful when dealing with binary data.

Another is to use nasl's '-T' option to generate a trace file.

> P.S. What is the use of 'display' function inside a plugin? Where
> does the
> text go? nessusd.messages? saved knowledge base? or the final reports?

display() sends output to standard output, which is redirected to
nessusd.dump when the plugin runs via the nessusd.

George
--
theall@tenablesecurity.com



_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers
Re: How to debug the plugin [ In reply to ]
Thank you, George. Your answer is very clear.

I have another question. What is the state of the GPLed plugins, i.e.
those from nessus-plugins-GPL-2.2.11.tar.gz tar ball? Are they actively
maintained? They seem not in working condition. For example, the
RA_ssh_detect.nasl plugin depends on ssh_detect.nasl and the later is not
in the tar ball.

Fred

On Mon, August 4, 2008 7:38 pm, George A. Theall wrote:
> On Aug 2, 2008, at 12:26 PM, Fred Qiu wrote:
>
>> Generally how do you guys debug a plugin? The 'nasl' command seems not
>> always helpful if a plugin depends on others such as find_service.
>
> One approach is to add calls to display output at key places in the
> script. display() does this unconditionally; debug_print(), which is
> declared in global_settings.inc, does it conditionally so you can turn
> off debugging; and dump(), declared in dump.inc, does it in a format
> that's useful when dealing with binary data.
>
> Another is to use nasl's '-T' option to generate a trace file.
>
>> P.S. What is the use of 'display' function inside a plugin? Where
>> does the
>> text go? nessusd.messages? saved knowledge base? or the final reports?
>
> display() sends output to standard output, which is redirected to
> nessusd.dump when the plugin runs via the nessusd.
>
> George
> --
> theall@tenablesecurity.com
>
>
>
> _______________________________________________
> Plugins-writers mailing list
> Plugins-writers@list.nessus.org
> http://mail.nessus.org/mailman/listinfo/plugins-writers
>

_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers
Re: How to debug the plugin [ In reply to ]
On Aug 5, 2008, at 12:15 AM, Fred Qiu wrote:

> I have another question. What is the state of the GPLed plugins, i.e.
> those from nessus-plugins-GPL-2.2.11.tar.gz tar ball?


We do not recommend that you use them.

George
--
theall@tenablesecurity.com



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