Nmap Development mailing list archives

nmap 3.95, Windows XP SP2: issues in scan_engine.cc ultrascan_port_pspec_update()


From: kx <kxmail () gmail com>
Date: Mon, 19 Dec 2005 14:39:07 -0500

nmap 3.95, Windows XP SP2: issues in scan_engine.cc
ultrascan_port_pspec_update()

The scan used was nmap -e eth0 -sP 192.168.1.0/24

Of course I am having trouble recreating the issue now that I have
tinkered with the source, but in line 1819, scan_engine.cc,
ultrascan_port_pspec_update() a ping scan was falling through to the
assert():

  if (USI->prot_scan) {
    proto = IPPROTO_IP;
    portno = pspec->proto;
  } else if (pspec->type == PS_TCP) {
    proto = IPPROTO_TCP;
    portno = pspec->pd.tcp.dport;
  } else if (pspec->type == PS_UDP) {
    proto = IPPROTO_UDP;
    portno = pspec->pd.udp.dport;
  }  else  assert(0);

Is the following switch needed before the assert()?

else if (pspec->type == PS_ARP) {
  proto = PS_ARP;
  portno = pspec->proto;
}

They are probably not the correct values for proto and portno, but it
did fix the error for me.

Still looking at the NmapArpCache() oddity when the addresses are not
directly connected such as nmap -e eth0 -sP 10.0.1.0/24

Cheers,
  kx


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev


Current thread: