1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-17 13:09:02 +00:00

Added another case to NmapOps::RawScan() to fix a bug where the "Raw packets

sent..." message would not be displayed.
This commit is contained in:
josh
2009-06-05 04:06:12 +00:00
parent 881fc1777f
commit 198cb57ea2
2 changed files with 8 additions and 4 deletions

View File

@@ -1,5 +1,9 @@
# Nmap Changelog ($Id$); -*-text-*- # Nmap Changelog ($Id$); -*-text-*-
o Added another case to NmapOps::RawScan() to cover the case where we are using
a SYN ping scan and issuing raw packets. This fixes a bug wherein nmap would
not display the "Raw packets sent..." message [Josh Marlow]
o Changed the ICMP ping probes to use a random non-zero ICMP id. Some hosts o Changed the ICMP ping probes to use a random non-zero ICMP id. Some hosts
seem to drop probes when ICMP id is 0 [Josh Marlow] seem to drop probes when ICMP id is 0 [Josh Marlow]

View File

@@ -321,15 +321,15 @@ bool NmapOps::UDPScan() {
return udpscan; return udpscan;
} }
/* this function does not currently cover cases such as TCP SYN ping
scan which can go either way based on whether the user is root or
IPv6 is being used. It will return false in those cases where a
RawScan is not neccessarily used. */
bool NmapOps::RawScan() { bool NmapOps::RawScan() {
if (ackscan|finscan|idlescan|ipprotscan|maimonscan|nullscan|osscan|synscan|udpscan|windowscan|xmasscan|sctpinitscan|sctpcookieechoscan) if (ackscan|finscan|idlescan|ipprotscan|maimonscan|nullscan|osscan|synscan|udpscan|windowscan|xmasscan|sctpinitscan|sctpcookieechoscan)
return true; return true;
if (pingtype & (PINGTYPE_ICMP_PING|PINGTYPE_ICMP_MASK|PINGTYPE_ICMP_TS|PINGTYPE_TCP_USE_ACK|PINGTYPE_UDP|PINGTYPE_SCTP_INIT)) if (pingtype & (PINGTYPE_ICMP_PING|PINGTYPE_ICMP_MASK|PINGTYPE_ICMP_TS|PINGTYPE_TCP_USE_ACK|PINGTYPE_UDP|PINGTYPE_SCTP_INIT))
return true; return true;
/* A SYN scan will only generate raw packets if nmap is running as root and is
not issuing IPv6 packets. Otherwise, it becomes a connect scan. */
if ((pingtype & PINGTYPE_TCP_USE_SYN) && (af() == AF_INET) && isr00t)
return true;
return false; return false;
} }