From 76b9ab50752a4ad39563cb33512a0d6fabf56d0f Mon Sep 17 00:00:00 2001 From: bol-van Date: Sun, 7 Dec 2025 16:52:37 +0300 Subject: [PATCH] zapret-lib: improve random seed --- lua/zapret-lib.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/zapret-lib.lua b/lua/zapret-lib.lua index 0f4fd6b..f8d57f7 100644 --- a/lua/zapret-lib.lua +++ b/lua/zapret-lib.lua @@ -1,8 +1,8 @@ HEXDUMP_DLOG_MAX = HEXDUMP_DLOG_MAX or 32 NOT3=bitnot(3) NOT7=bitnot(7) -math.randomseed(os.time()) - +-- xor pid,tid,sec,nsec +math.randomseed(bitxor(getpid(),gettid(),clock_gettime())) -- basic desync function -- execute given lua code. "desync" is temporary set as global var to be accessible to the code