mirror of
https://github.com/nmap/nmap.git
synced 2026-01-03 05:09:14 +00:00
Merging my -sO -p-XX, rangestart=0 patch. Also (new change) if it's like -sO -pXX-, we cut off rangeend at 255 instead of 65535 so we don't have to do the extra looping later in a while(). IP Proto scanning cant be used along with TCP or UDP scans so cutting it off here works better.
This commit is contained in:
4
nmap.cc
4
nmap.cc
@@ -1906,7 +1906,7 @@ struct scan_lists *getpts(char *origexpr) {
|
||||
continue;
|
||||
}
|
||||
if (*current_range == '-') {
|
||||
rangestart = 1;
|
||||
rangestart = o.ipprotscan ? 0 : 1;
|
||||
}
|
||||
else if (isdigit((int) *current_range)) {
|
||||
rangestart = strtol(current_range, &endptr, 10);
|
||||
@@ -1933,7 +1933,7 @@ struct scan_lists *getpts(char *origexpr) {
|
||||
current_range++;
|
||||
if (!*current_range || *current_range == ',') {
|
||||
/* Ended with a -, meaning up until the last possible port */
|
||||
rangeend = 65535;
|
||||
rangeend = o.ipprotscan ? 255 : 65535;
|
||||
} else if (isdigit((int) *current_range)) {
|
||||
rangeend = strtol(current_range, &endptr, 10);
|
||||
if (o.ipprotscan) {
|
||||
|
||||
Reference in New Issue
Block a user