mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
fix: 'script run legic' - bytes was in string format,
This commit is contained in:
parent
48c71aeef6
commit
d792f015a2
1 changed files with 8 additions and 5 deletions
|
@ -653,14 +653,17 @@ local function save_BIN(data, filename)
|
|||
|
||||
outfile = io.open(fn, 'wb')
|
||||
|
||||
local bytes = utils.ConvertHexToBytes(data)
|
||||
|
||||
local i = 1
|
||||
while data[i] do
|
||||
outfile:write(data[i])
|
||||
while bytes[i] do
|
||||
|
||||
outfile:write(bytes[i])
|
||||
i = i + 1
|
||||
end
|
||||
|
||||
outfile:close()
|
||||
return fn
|
||||
return fn, #bytes
|
||||
end
|
||||
---
|
||||
-- write bytes to file
|
||||
|
@ -698,10 +701,10 @@ function writeFile(bytes, filename)
|
|||
fho:close()
|
||||
|
||||
-- save binary
|
||||
local fn_bin = save_BIN(bytes, filename)
|
||||
local fn_bin, num_of_bytes = save_BIN(bytes, filename)
|
||||
|
||||
print("\nwrote ".. #bytes * 3 .." bytes to " .. filename)
|
||||
print("\nwrote ".. #bytes .." bytes to " .. fn_bin)
|
||||
print("\nwrote ".. num_of_bytes .." bytes to " .. fn_bin)
|
||||
return true
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue