mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
FIX: introduced a bug in luascripts when adding the "safe ascii chars" to ConvertHexToAscii. Now its optional.
This commit is contained in:
parent
672d72de89
commit
b9534ca070
3 changed files with 16 additions and 12 deletions
|
@ -285,14 +285,15 @@ local Utils =
|
|||
return rev
|
||||
end,
|
||||
|
||||
ConvertHexToAscii = function(s)
|
||||
ConvertHexToAscii = function(s, useSafechars)
|
||||
if s == nil then return '' end
|
||||
if #s == 0 then return '' end
|
||||
local t={}
|
||||
for k in s:gmatch"(%x%x)" do
|
||||
local n = tonumber(k,16)
|
||||
|
||||
local n = tonumber(k,16)
|
||||
local c
|
||||
if (n < 32) or (n == 127) then
|
||||
if useSafechars and ( (n < 32) or (n == 127) ) then
|
||||
c = '.';
|
||||
else
|
||||
c = string.char(n)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue