Benign lua Download

lua-struct 1.0.0-1

“Implementation of binary packing/unpacking in pure lua”

Source contains low-bit mask syntaxSource references XOR syntax
SHA-256f803c3ea36946482821a488f795fa6b79b7bf7d37ba31188a16627d9a7b594df

Evidence

Lua describe test block struct_spec.lua · lines 22–30
22:37… to 0, so it is made at run time
23local negzero = -1 / math.huge
24
25describe("struct test", function ()
26
27 it("test ss", function ()
28 local s1 = "test1"
29 local s2 = "test2"
30 local pack …
Lua long hex string literals struct_spec.lua · lines 111–116
111:21… ndian unless told otherwise", function ()
112 assert.equal("78563412", hex(struct.pack("I", 0x12345678)))
113 assert.equal("78563412", hex(struct.pack("<I", 0x12345678)))
114 assert.equal("12345678", hex(struct.pack(">I", 0x12345678)))
115 assert.equal(0x12345678, (struct.unpack("I", bin("78563412"))))
116 assert.eq …
References a public code-forge URL struct_spec.lua · lines 154–162
154:19… al("f380", hex(struct.pack(">h", -3200)))
155 assert.equal("feffffff", hex(struct.pack("<i", -2)))
156 -- https://github.com/iryont/lua-struct/issues/3
157 assert.equal("feffffffffffffff", hex(struct.pack("<l", -2)))
158 assert.equal("fffffffffffffffe", hex(struct.pack(">l", -2)))
159 end)
160
161 it("unpack negative 8 byte numbers without losing the low bits", function ()
162 …
Source references XOR syntax struct_spec.lua · lines 166–170
166:81…
167 end
168 for i = 0, 62 do
169 assert.equal(2 ^ i, (struct.unpack("<l", struct.pack("<l", 2 ^ i))))
170 assert.equal(-2 ^ i, (struct.unpack("<l", struct.pack("<l", -2 ^ …
Source contains low-bit mask syntax struct.lua · lines 246–255
246:67… ps the sign of -0.0
247 val = val * 1.0
248 if val < 0 or (val == 0 and 1 / val < 0) then
249 sign = 1
250 val = -val
⋯5 lines

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.