mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
chg: 'script run ndef_dump' - local functions
This commit is contained in:
parent
730a7e8044
commit
f760ac99e3
1 changed files with 5 additions and 5 deletions
|
@ -24,13 +24,13 @@ local example = "script run xxx"
|
||||||
local author = "Martin Holst Swende & Asper"
|
local author = "Martin Holst Swende & Asper"
|
||||||
---
|
---
|
||||||
-- PrintAndLog
|
-- PrintAndLog
|
||||||
function prlog(...)
|
local function prlog(...)
|
||||||
-- TODO; replace this with a call to the proper PrintAndLog
|
-- TODO; replace this with a call to the proper PrintAndLog
|
||||||
print(...)
|
print(...)
|
||||||
end
|
end
|
||||||
---
|
---
|
||||||
-- This is only meant to be used when errors occur
|
-- This is only meant to be used when errors occur
|
||||||
function oops(err)
|
local function oops(err)
|
||||||
prlog("ERROR: ",err)
|
prlog("ERROR: ",err)
|
||||||
return nil,err
|
return nil,err
|
||||||
end
|
end
|
||||||
|
@ -70,13 +70,13 @@ local utils = {
|
||||||
|
|
||||||
---
|
---
|
||||||
-- Usage help
|
-- Usage help
|
||||||
function help()
|
local function help()
|
||||||
prlog(desc)
|
prlog(desc)
|
||||||
prlog("Example usage")
|
prlog("Example usage")
|
||||||
prlog(example)
|
prlog(example)
|
||||||
end
|
end
|
||||||
|
|
||||||
function debug(...)
|
local function debug(...)
|
||||||
if DEBUG then
|
if DEBUG then
|
||||||
prlog("debug:", ...)
|
prlog("debug:", ...)
|
||||||
end
|
end
|
||||||
|
@ -158,7 +158,7 @@ end
|
||||||
|
|
||||||
--- This function is a lua-implementation of
|
--- This function is a lua-implementation of
|
||||||
-- cmdhf14a.c:waitCmd(uint8_t iSelect)
|
-- cmdhf14a.c:waitCmd(uint8_t iSelect)
|
||||||
function waitCmd(iSelect)
|
local function waitCmd(iSelect)
|
||||||
local response = core.WaitForResponseTimeout(cmds.CMD_ACK,1000)
|
local response = core.WaitForResponseTimeout(cmds.CMD_ACK,1000)
|
||||||
if response then
|
if response then
|
||||||
local count,cmd,arg0,arg1,arg2 = bin.unpack('LLLL',response)
|
local count,cmd,arg0,arg1,arg2 = bin.unpack('LLLL',response)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue