1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-01 12:29:03 +00:00

Key service table on protocol number, not name

This commit is contained in:
dmiller
2022-09-16 01:10:19 +00:00
parent 6c6d4e33b5
commit 3a32543db0
4 changed files with 65 additions and 58 deletions

View File

@@ -465,15 +465,15 @@ static void getpts_aux(const char *origexpr, int nested, u8 *porttbl, int range_
} else {
if (nested) {
if ((range_type & SCAN_TCP_PORT) &&
nmap_getservbyport(rangestart, "tcp")) {
nmap_getservbyport(rangestart, IPPROTO_TCP)) {
porttbl[rangestart] |= SCAN_TCP_PORT;
}
if ((range_type & SCAN_UDP_PORT) &&
nmap_getservbyport(rangestart, "udp")) {
nmap_getservbyport(rangestart, IPPROTO_UDP)) {
porttbl[rangestart] |= SCAN_UDP_PORT;
}
if ((range_type & SCAN_SCTP_PORT) &&
nmap_getservbyport(rangestart, "sctp")) {
nmap_getservbyport(rangestart, IPPROTO_SCTP)) {
porttbl[rangestart] |= SCAN_SCTP_PORT;
}
if ((range_type & SCAN_PROTOCOLS) &&