mirror of
https://github.com/nmap/nmap.git
synced 2025-12-29 19:09:01 +00:00
Updated all the stray calls to rand() to use nbase_rnd instead. The
only code left in Nmap that still uses rand() is in the Lua math library. Perhaps at some point we'll need to expose high-quality random numbers to Lua via our custom nmap library.
This commit is contained in:
5
nmap.cc
5
nmap.cc
@@ -505,7 +505,6 @@ int nmap_main(int argc, char *argv[]) {
|
||||
size_t sslen;
|
||||
int option_index;
|
||||
bool iflist = false;
|
||||
struct timeval tv;
|
||||
|
||||
// Pre-specified timing parameters.
|
||||
// These are stored here during the parsing of the arguments so that we can
|
||||
@@ -649,10 +648,6 @@ int nmap_main(int argc, char *argv[]) {
|
||||
|
||||
if (argc < 2 ) printusage(argv[0], -1);
|
||||
|
||||
/* You never know when "random" numbers will come in handy ... */
|
||||
gettimeofday(&tv, NULL);
|
||||
srand((tv.tv_sec ^ tv.tv_usec) ^ getpid() + 31337);
|
||||
|
||||
Targets.reserve(100);
|
||||
#ifdef WIN32
|
||||
win_pre_init();
|
||||
|
||||
Reference in New Issue
Block a user