mirror of
https://github.com/nmap/nmap.git
synced 2026-10-21 11:22:05 +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:
parent
19f44f6648
commit
9b9d2bd85e
4 changed files with 12 additions and 13 deletions
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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue