Nmap Development mailing list archives

[NSE] nmap.verbosity()


From: John Bond <john.r.bond () gmail com>
Date: Sat, 16 Jun 2012 12:51:24 +0200

Im trying to use the nmap.verbosity() call and it is not acting as i
expected.  It seems that the default value returned is 2.  i wrote the
following script below to double check this.  is this expected? Have i
made a stupid error? or is this a bug?

description = [[
]]
author = ""
license = ""
categories = {"discovery", "external", "safe"}
require "stdnse"
prerule = function()
        return true
end
action = function(host, port)
        return stdnse.format_output(true,("Verbosity: %s"):format(nmap.verbosity()))
end

this is the output:

Starting Nmap 6.01 ( http://nmap.org ) at 2012-06-16 12:49 CEST
NSE: Loaded 1 scripts for scanning.
NSE: Script Pre-scanning.
Initiating NSE at 12:49
Completed NSE at 12:49, 0.00s elapsed
Pre-scan script results:
| verbosity-check:
|_  Verbosity: 2
Initiating Ping Scan at 12:49
Scanning localhost (127.0.0.1) [2 ports]
Completed Ping Scan at 12:49, 0.00s elapsed (1 total hosts)
Initiating Connect Scan at 12:49
Scanning localhost (127.0.0.1) [1 port]
Discovered open port 35871/tcp on 127.0.0.1
Completed Connect Scan at 12:49, 0.00s elapsed (1 total ports)
NSE: Script scanning 127.0.0.1.
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000078s latency).
PORT      STATE SERVICE
35871/tcp open  unknown

NSE: Script Post-scanning.
Read data files from: /usr/local/bin/../share/nmap
Nmap done: 1 IP address (1 host up) scanned in 0.06 seconds
(0)[605]~ $ cat verbosity-check.nse
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: