mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Don't scan infinite random when no targets specified
This commit is contained in:
@@ -285,7 +285,7 @@ bool target_needs_new_hostgroup(Target **targets, int targets_sz, const Target *
|
||||
The target_expressions array MUST REMAIN VALID IN MEMORY as long as
|
||||
this class instance is used -- the array is NOT copied.
|
||||
*/
|
||||
HostGroupState::HostGroupState(int lookahead, int rnd, unsigned long num_random, int argc, const char **argv) {
|
||||
HostGroupState::HostGroupState(int lookahead, int rnd, bool gen_rand, unsigned long num_random, int argc, const char **argv) {
|
||||
assert(lookahead > 0);
|
||||
this->argc = argc;
|
||||
this->argv = argv;
|
||||
@@ -296,7 +296,7 @@ HostGroupState::HostGroupState(int lookahead, int rnd, unsigned long num_random,
|
||||
current_batch_sz = 0;
|
||||
next_batch_no = 0;
|
||||
randomize = rnd;
|
||||
if (num_random >= 0) {
|
||||
if (gen_rand) {
|
||||
current_group.generate_random_ips(num_random);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user