mirror of
https://github.com/nmap/nmap.git
synced 2025-12-31 03:49:01 +00:00
Avoid using commonly-spoofed-closed ports as ping/timing ports
This commit is contained in:
@@ -1796,6 +1796,13 @@ static unsigned int pingprobe_score(const probespec *pspec, int state) {
|
||||
score = 2;
|
||||
else if (pspec->pd.tcp.flags == TH_SYN && (state == PORT_OPEN || state == PORT_UNKNOWN))
|
||||
score = 3;
|
||||
else if (pspec->pd.tcp.dport == 25 ||
|
||||
pspec->pd.tcp.dport == 113 ||
|
||||
pspec->pd.tcp.dport == 135 ||
|
||||
pspec->pd.tcp.dport == 139 ||
|
||||
pspec->pd.tcp.dport == 445)
|
||||
/* Frequently spoofed port numbers */
|
||||
score = 5;
|
||||
else
|
||||
score = 6;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user