Home page logo

nmap-dev logo Nmap Development mailing list archives

NSE - hostrule function passed an empty host object
From: Peter Hogg <dev () vokoda com>
Date: Thu, 27 Jan 2011 15:35:39 +0000

Hi, I'm trying to create a hostrule to check that traceroute data is
available for the given host - very simple. This is what I have:

require 'nsedebug'

hostrule = function(host)
  if not host.traceroute then
     return false
  return true

When I test this using the --traceroute option, it returns false.
Furthermore the host object contains only a 'mac_addr_sr' key. I must
be doing something very stupid. I'm on OS X 10.6, Nmap 5.21 compiled
from source. Here is the output:

bash-3.2$ sudo nmap --script test --traceroute -d

.....lots of debug text.....

NSE: Script scanning
NSE: Script Scanning completed.
Nmap scan report for
Host is up, received echo-reply (0.043s latency).
Scanned at 2011-01-27 15:23:32 GMT for 7s
Not shown: 995 filtered ports
Reason: 995 no-responses
80/tcp   open   http    syn-ack
113/tcp  closed auth    reset
443/tcp  open   https   syn-ack
554/tcp  closed rtsp    reset
1935/tcp closed rtmp    reset

TRACEROUTE (using port 113/tcp)
1   35.62 ms  REMOVED BY ME
2   31.45 ms  REMOVED BY ME
3   34.86 ms  REMOVED BY ME
4   38.83 ms  REMOVED BY ME
5   105.04 ms REMOVED BY ME
6   28.95 ms  REMOVED BY ME
7   37.38 ms  acc1-10GigE-3-3-0.sf.21cn-ipp.bt.net (
8   39.30 ms  core2-te0-12-0-6.ilford.ukcore.bt.net (
9   41.69 ms  core4te-0-7-1-0.telehouse.ukcore.bt.net (
10  37.15 ms
Final times for host: srtt: 42924 rttvar: 20263  to: 123976

Read from /opt/local/share/nmap: nmap-services.
Nmap done: 1 IP address (1 host up) scanned in 7.08 seconds
           Raw packets sent: 2016 (88.680KB) | Rcvd: 22 (1052B)

Any ideas on what I might be doing wrong?

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

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]