mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-03 19:43:09 +08:00
fix the loadfile command and more colors
This commit is contained in:
parent
0180ca305e
commit
c6cc1b2416
1 changed files with 3 additions and 4 deletions
|
@ -269,7 +269,6 @@ local function padString(str)
|
||||||
if (#str == 1) then
|
if (#str == 1) then
|
||||||
return '0'..str
|
return '0'..str
|
||||||
end
|
end
|
||||||
|
|
||||||
return str
|
return str
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -336,6 +335,7 @@ end
|
||||||
---
|
---
|
||||||
-- check availability of file
|
-- check availability of file
|
||||||
function file_check(file_name)
|
function file_check(file_name)
|
||||||
|
if not file_name then return false, "" end
|
||||||
|
|
||||||
local arr = split(file_name, ".")
|
local arr = split(file_name, ".")
|
||||||
local path = core.search_file(arr[1], "."..arr[2])
|
local path = core.search_file(arr[1], "."..arr[2])
|
||||||
|
@ -2424,8 +2424,7 @@ function modifyMode()
|
||||||
---
|
---
|
||||||
-- load file into mainTAG
|
-- load file into mainTAG
|
||||||
["lf"] = function(x)
|
["lf"] = function(x)
|
||||||
|
if (x and not x=="" and type(x)=='string' and file_check(x)) then
|
||||||
if (type(x)=='string' and file_check(x)) then
|
|
||||||
filename = x
|
filename = x
|
||||||
else
|
else
|
||||||
filename = input("enter filename: ", "legic.temp")
|
filename = input("enter filename: ", "legic.temp")
|
||||||
|
@ -2782,7 +2781,7 @@ function modifyMode()
|
||||||
}
|
}
|
||||||
repeat
|
repeat
|
||||||
-- default message / prompt
|
-- default message / prompt
|
||||||
ic=input("Legic command? ('h' for help - 'q' for quit)", "h")
|
ic=input("Legic command? ('"..acy.."h"..acr.."' for help - '"..acy.."q"..acr.."' for quit)", acy.."h"..acr)
|
||||||
-- command actions decisions (first match, longer commands before shorter)
|
-- command actions decisions (first match, longer commands before shorter)
|
||||||
if (type(actions[string.lower(string.sub(ic,0,3))])=='function') then
|
if (type(actions[string.lower(string.sub(ic,0,3))])=='function') then
|
||||||
actions[string.lower(string.sub(ic,0,3))](string.sub(ic,5))
|
actions[string.lower(string.sub(ic,0,3))](string.sub(ic,5))
|
||||||
|
|
Loading…
Reference in a new issue