"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "scan_lists.cc" between
nmap-7.90.tgz and nmap-7.91.tgz

About: Nmap ("Network Mapper") is a utility for network exploration or security auditing (port scanner).

scan_lists.cc  (nmap-7.90.tgz):scan_lists.cc  (nmap-7.91.tgz)
skipping to change at line 340 skipping to change at line 340
if (change_range_type) if (change_range_type)
syntax_example = "-100,200-1024,T:3000-4000,U:60000-"; syntax_example = "-100,200-1024,T:3000-4000,U:60000-";
else else
syntax_example = "-100,200-1024,3000-4000,60000-"; syntax_example = "-100,200-1024,3000-4000,60000-";
current_range = origexpr; current_range = origexpr;
do { do {
while (isspace((int) (unsigned char) *current_range)) while (isspace((int) (unsigned char) *current_range))
current_range++; /* I don't know why I should allow spaces here, but I wil l */ current_range++; /* I don't know why I should allow spaces here, but I wil l */
if (change_range_type) { if (change_range_type && *(current_range+1) == ':') {
if (*current_range == 'T' && *(current_range+1) == ':') { switch (*current_range) {
current_range += 2; case 'T':
range_type = SCAN_TCP_PORT; range_type = SCAN_TCP_PORT;
if (!o.TCPScan()) { break;
error("WARNING: Your ports include \"T:\" but you haven't specified an case 'U':
y TCP scan type."); range_type = SCAN_UDP_PORT;
} break;
continue; case 'S':
} range_type = SCAN_SCTP_PORT;
if (*current_range == 'U' && *(current_range+1) == ':') { break;
current_range += 2; case 'P':
range_type = SCAN_UDP_PORT; range_type = SCAN_PROTOCOLS;
if (!o.UDPScan()) { break;
error("WARNING: Your ports include \"U:\" but you haven't specified UD default:
P scan with -sU."); fatal("Error parsing port list: Unknown protocol specifier '%c'.", *cu
} rrent_range);
continue; break;
}
if (*current_range == 'S' && *(current_range+1) == ':') {
current_range += 2;
range_type = SCAN_SCTP_PORT;
if (!o.SCTPScan()) {
error("WARNING: Your ports include \"S:\" but you haven't specified an
y SCTP scan type.");
}
continue;
}
if (*current_range == 'P' && *(current_range+1) == ':') {
current_range += 2;
range_type = SCAN_PROTOCOLS;
if (!o.ipprotscan) {
error("WARNING: Your ports include \"P:\" but you haven't specified IP
Protocol scan with -sO.");
}
continue;
} }
current_range += 2;
continue;
} }
if (*current_range == '[') { if (*current_range == '[') {
if (nested) if (nested)
fatal("Can't nest [] brackets in port/protocol specification"); fatal("Can't nest [] brackets in port/protocol specification");
getpts_aux(++current_range, 1, porttbl, range_type, portwarning); getpts_aux(++current_range, 1, porttbl, range_type, portwarning);
// Skip past the ']'. This is OK because we can't nest []s // Skip past the ']'. This is OK because we can't nest []s
while (*current_range != ']' && *current_range != '\0') while (*current_range != ']' && *current_range != '\0')
 End of changes. 2 change blocks. 
36 lines changed or deleted 20 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)