mirror of
https://github.com/nmap/nmap.git
synced 2026-01-03 05:09:14 +00:00
Add --max-rate to go with --min-rate.
This commit is contained in:
@@ -192,6 +192,7 @@ void NmapOps::Initialize() {
|
||||
debugging = 0;
|
||||
verbose = 0;
|
||||
min_packet_send_rate = 0.0; /* Unset. */
|
||||
max_packet_send_rate = 0.0; /* Unset. */
|
||||
randomize_hosts = 0;
|
||||
sendpref = PACKET_SEND_NOPREF;
|
||||
spoofsource = 0;
|
||||
@@ -443,6 +444,10 @@ void NmapOps::ValidateOptions() {
|
||||
if (max_parallelism && min_parallelism && (min_parallelism > max_parallelism)) {
|
||||
fatal("--min-parallelism=%i must be less than or equal to --max-parallelism=%i",min_parallelism,max_parallelism);
|
||||
}
|
||||
|
||||
if (min_packet_send_rate != 0.0 && max_packet_send_rate != 0.0 && min_packet_send_rate > max_packet_send_rate) {
|
||||
fatal("--min-rate=%g must be less than or equal to --max-rate=%g", min_packet_send_rate, max_packet_send_rate);
|
||||
}
|
||||
|
||||
if (af() == AF_INET6 && (numdecoys|osscan|bouncescan|fragscan|ackscan|finscan|idlescan|ipprotscan|maimonscan|nullscan|synscan|udpscan|windowscan|xmasscan)) {
|
||||
fatal("Sorry -- IPv6 support is currently only available for connect() scan (-sT), ping scan (-sP), and list scan (-sL). OS detection and decoys are also not supported with IPv6. Further support is under consideration.");
|
||||
|
||||
Reference in New Issue
Block a user