Nmap Development mailing list archives
Re: Some hints for nmap scripts
From: "Patrick Donnelly" <batrick.donnelly () gmail com>
Date: Tue, 2 Dec 2008 10:44:32 -0700
On Tue, Dec 2, 2008 at 9:00 AM, jah <jah () zadkiel plus com> wrote:
On 02/12/2008 15:41, Patrick Donnelly wrote:On Tue, Dec 2, 2008 at 7:49 AM, jah <jah () zadkiel plus com> wrote:The only script currently using this stuff is one named promiscuous.nse in Nmap versions up to 4.76 (now named sniffer-detect.nse) (as an aside, this script has a commented-out section between --[[ and ]]-- which is not the correct way [3] - it should be --[[ and --]], but for some reason the script still works as expected and considers the improperly commented section as a properly commented section - v. odd.)This is actually a "trick" Roberto mentions in his book, PiL, in [1]. The comments in sniffer-detect.nse are correct. [1] http://www.lua.org/pil/1.3.htmlI think the trick you refer to is to uncomment a previously commented block by adding a third hyphen ---[[ --]]
This is correct. I misread your earlier post taking to mean that --[[ ]] commenting should be --[[ --]]. The --[[ ]]-- works because the final two hyphens are interpreted as a single line comment (which of course is empty as there is nothing between the hyphens and the newline). Cheers, -- -Patrick Donnelly "One of the lessons of history is that nothing is often a good thing to do and always a clever thing to say." -Will Durant _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- Some hints for nmap scripts Dirk.Wissmann (Dec 02)
- Re: Some hints for nmap scripts Ron (Dec 02)
- Re: Some hints for nmap scripts A. Ramos (Dec 02)
- AW: Some hints for nmap scripts Dirk.Wissmann (Dec 02)
- Re: Some hints for nmap scripts jah (Dec 02)
- Re: Some hints for nmap scripts Patrick Donnelly (Dec 02)
- Re: Some hints for nmap scripts jah (Dec 02)
- Re: Some hints for nmap scripts Patrick Donnelly (Dec 02)
- Re: Some hints for nmap scripts jah (Dec 02)
- Re: Some hints for nmap scripts Patrick Donnelly (Dec 08)
- Re: Some hints for nmap scripts Patrick Donnelly (Dec 02)
- Re: Some hints for nmap scripts Kris Katterjohn (Dec 03)