From 4b427bbcfcf50d9b30574c48e6f4c36806850e7d Mon Sep 17 00:00:00 2001 From: Tobias Mueller Date: Wed, 18 Oct 2023 20:59:33 +0200 Subject: [PATCH] lua: print a random IMEI from the seed provided I don't know how much stronger we can see the LUA RNG. It seems to accept an "int" which I assume is 32 bit. It will complain if the seed is too big. --- files/lib/blue-merle/luhn.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/lib/blue-merle/luhn.lua b/files/lib/blue-merle/luhn.lua index cffd4da..b3c6a81 100644 --- a/files/lib/blue-merle/luhn.lua +++ b/files/lib/blue-merle/luhn.lua @@ -56,4 +56,6 @@ function make_random_imei () return imei end -print (make_imei ("354809108035177")) +math.randomseed(tonumber(arg[1])) + +print (make_random_imei ())