1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-07 06:59:03 +00:00

Interpret '-' by itself as an IPv4 octet as being short for "0-255". So

192.168.-.0 is the same as 192.168.0-255.0. It looks like this was intended all
along, but a coding error kept it from working.
This commit is contained in:
david
2009-02-21 04:00:21 +00:00
parent 4b27c53433
commit 73356bf715

View File

@@ -259,7 +259,7 @@ int TargetGroup::parse_expr(const char * const target_expr, int af) {
if (*addy[i] == '*') { start = 0; end = 255; }
else if (*addy[i] == '-') {
start = 0;
if (!(addy[i] + 1)) end = 255;
if (*(addy[i] + 1) == '\0') end = 255;
else end = atoi(addy[i]+ 1);
}
else {