mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +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:
parent
4b27c53433
commit
73356bf715
1 changed files with 1 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue