Nmap Development mailing list archives

Re: quake-server-info.nse


From: Ulrik Haugen <qha () lysator liu se>
Date: Wed, 05 Mar 2014 21:50:06 +0100

Daniel Miller <bonsaiviking () gmail com> wrote:
This looks great! We don't often get submissions that have all the
required NSEdoc tags and such a clean formatting. I'm looking forward
to testing this later.

Thanks, happy to hear it!


In the meantime, perhaps you could update the script to emit
structured XML output
(http://nmap.org/book/nse-api.html#nse-structured-output). You'll find
that this actually simplifies the script, since you can just return a
key-value table instead of formatting strings and using
stdnse.format_output.

I've done this and cleaned it up in a bunch of other ways too. I wasn't
satisfied with how the table was rendered to unstructured output (and
that is the format i will use so i wrote a formatter that takes a table
suitable for structured output and produces something closer to the
result of stdnse.format_output. Please see make_formatter and
collate_results in my new version. If there's any interest in putting it
in a library i could extend it with the desirable remaining parts of
format_output and write some proper documentation.


Also, I'd prefer not to have the form-feed (0x0c) characters in the
comments: whitespace should be limited to 0x20 (space) and 0x0a (line
feed). I'm trying to collect these style suggestions here:
https://secwiki.org/w/Nmap/Code_Standards

Sure, i just put them in so it would print better for a presentation,
they are gone.


Looking forward to trying this out and seeing your update!

Did you get a chance to try it yet?


Best regards
/Ulrik Haugen

Attachment: quake-server-info.nse
Description: Updated script

_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/

Current thread: