mirror of
https://github.com/nmap/nmap.git
synced 2025-12-25 08:59:01 +00:00
udp port 0 fix from Kris
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
# Nmap Changelog ($Id$); -*-text-*-
|
||||
|
||||
o Fixed a bug which caused port 0 to be improperly used for gen1 OS
|
||||
detection in some cases when your scan includes port 0 (it isn't
|
||||
included by default). Thanks to Sebastian Wolfgarten for the report
|
||||
and Kris Katterjohn for the fix.
|
||||
|
||||
o Updated nmap-mac-prefixes to latest IEEE data as of 5/18/07. Also
|
||||
removed some high (greater than 0x80) characters from some company
|
||||
names because they were causing this error on Windows when Nmap is
|
||||
|
||||
13
osscan.cc
13
osscan.cc
@@ -575,10 +575,21 @@ static FingerPrint *get_fingerprint(Target *target, struct seq_info *si) {
|
||||
/* Now we should find a closed port */
|
||||
if ((tport = target->ports.nextPort(NULL, IPPROTO_TCP, PORT_CLOSED))) {
|
||||
closedport = tport->portno;
|
||||
target->FPR1->osscan_closedtcpport = tport->portno;
|
||||
|
||||
/* Port 0 seems to screw things up, so try to get another if available */
|
||||
if (tport->portno == 0)
|
||||
if ((tport = target->ports.nextPort(tport, IPPROTO_TCP, PORT_CLOSED)))
|
||||
closedport = tport->portno;
|
||||
|
||||
target->FPR1->osscan_closedtcpport = closedport;
|
||||
} else if ((tport = target->ports.nextPort(NULL, IPPROTO_TCP, PORT_UNFILTERED))) {
|
||||
/* Well, we will settle for unfiltered */
|
||||
closedport = tport->portno;
|
||||
|
||||
/* Port 0 seems to screw things up, so try to get another if available */
|
||||
if (tport->portno == 0)
|
||||
if ((tport = target->ports.nextPort(tport, IPPROTO_TCP, PORT_CLOSED)))
|
||||
closedport = tport->portno;
|
||||
} else {
|
||||
closedport = (get_random_uint() % 14781) + 30000;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user