The big Anavrins security update (round 1)

This commit is contained in:
kepler155c@gmail.com
2019-06-27 21:08:46 -04:00
parent 97a442e999
commit bcd33af599
17 changed files with 2308 additions and 204 deletions

View File

@@ -10,6 +10,19 @@ local _sformat = string.format
local _srep = string.rep
local _ssub = string.sub
function Util.hexToByteArray(str)
local r = {}
str = tostring(str)
for b in str:gmatch("%x%x?") do
r[#r+1] = tonumber(b, 16)
end
return r
end
function Util.byteArrayToHex(tbl)
return ("%02x"):rep(#tbl):format(unpack(tbl))
end
function Util.tryTimed(timeout, f, ...)
local c = os.clock()
repeat