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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user