Make Lua's random more random

This commit is contained in:
dmiller 2026-08-18 18:14:04 +00:00
parent b426f0d719
commit 6aaada8c53

View file

@ -975,6 +975,9 @@ local function run (threads_iter)
local progress = cnse.scan_progress_meter(NAME);
-- Use stronger random seed
math.randomseed(("jj"):unpack(nmap.get_random_bytes(("jj"):packsize())))
-- Loop while any thread is running or waiting.
while next(running) or next(waiting) or threads_iter do
-- Start as many new threads as possible.