Nmap Development mailing list archives
Re: Testing NSE scripts - guide
From: Johanna Curiel <johannapcuriel () gmail com>
Date: Fri, 11 Sep 2015 02:39:17 +0000
Hi Marilyn, So far I'm aware of, you can try debugging using script-trace example :# nmap -sV --script testscript.nse --packet-trace <hostip> There is also a debugging mode using '-d[1-9]' flag Try catching errors using stdnse.print_debug in your script as condition However something I'm experimenting on is how to create unit tests as explained here: http://lua-users.org/wiki/UnitTesting, since nse scripts are Lua programs. An approach I'm experimenting with is to use an Eclipse with Lua Development tools installed, try to unit test the Lua functions and use debuggin as nse script. regards Johanna On Wed, Sep 9, 2015 at 4:21 PM, marilyn monroe <marylinmonroessss () gmail com> wrote:
Hello, I'm new to writing NSE scripts and I would like to know what is the best approach, based on your experience , on testing them , unit testing them eventually. Help appreciated. Cheers Marilynh _______________________________________________ Sent through the dev mailing list https://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
_______________________________________________ Sent through the dev mailing list https://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Testing NSE scripts - guide marilyn monroe (Sep 09)
- Re: Testing NSE scripts - guide Johanna Curiel (Sep 10)