Mailing List Archive

Writing messages to logs
Is there a way to code a print statement or something like it inside a
plugin to write to the .messgaes file? Thanks!



Ryan Petti

Systems Engineer

Integration Partners Corporation
Re: Writing messages to logs [ In reply to ]
On Wed Jun 21 2006 at 18:44, Ryan Petti wrote:

> Is there a way to code a print statement or something like it inside a
> plugin to write to the .messgaes file? Thanks!

Not nessusd.messages
If you want to write to nessusd.dump, just use "display" Or include
global_settings.inc and use "log_print" or "debug_print"
_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers
RE: Writing messages to logs [ In reply to ]
Excellent.

Now my only issue is my display and x_print calls aren't working. I've
verified that the nessusd.dump file is being touched everytime I run a
scan, but the file is always empty. Is there a setting I'm missing
somewhere?

-----Original Message-----
From: Michel Arboi [mailto:mikhail@nessus.org]
Sent: Wednesday, June 21, 2006 1:14 PM
To: Ryan Petti
Cc: plugins-writers@list.nessus.org
Subject: Re: [Plugins-writers] Writing messages to logs

On Wed Jun 21 2006 at 18:44, Ryan Petti wrote:

> Is there a way to code a print statement or something like it inside a
> plugin to write to the .messgaes file? Thanks!

Not nessusd.messages
If you want to write to nessusd.dump, just use "display" Or include
global_settings.inc and use "log_print" or "debug_print"

_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers
Re: Writing messages to logs [ In reply to ]
Ryan Petti wrote:
> Excellent.
>
> Now my only issue is my display and x_print calls aren't working. I've
> verified that the nessusd.dump file is being touched everytime I run a
> scan, but the file is always empty. Is there a setting I'm missing
> somewhere?

if you have a display statement and run the script via NASL CLI does it
display any output?
a display won't show up in nessusd.dump.

include global_settings.inc and use a debug_level, like debug_level = 1;
This must show information in NASL CLI and the nessusd.dump file.

you can also use the file dump.inc for debuging
dump(ddata:abc, dtitle:def);

-- Ferdy
_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers
RE: Writing messages to logs [ In reply to ]
On Wed, 21 Jun 2006, Ryan Petti wrote:

> Excellent.
>
> Now my only issue is my display and x_print calls aren't working. I've
> verified that the nessusd.dump file is being touched everytime I run a
> scan, but the file is always empty. Is there a setting I'm missing
> somewhere?

The display() / log_print() / debug_print() functions should write to
nessus.dump provided the plugin's being run and the execution is
reaching the debugging function calls.

As Ferdy suggested, a simple test would be to try to launch the plugin
from a commandline. This should turn up any syntax errors in the plugin
that would prevent it from running.

If the logs show the plugin is being launched and the execution reaches
the debugging statements, but you still do not see the output in nessusd.dump
the plugin database might need to be regenerated with "nessusd -R".

--
- Josh
_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers
Re: Writing messages to logs [ In reply to ]
On Wed Jun 21 2006 at 21:10, Ryan Petti wrote:

> Now my only issue is my display and x_print calls aren't working.

Are you sure that your scripts are running?
Which Nessus version are you running?
_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers