mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
chg: script run dumptoemul - better fail messages
This commit is contained in:
parent
b06274623f
commit
3f9613b87f
1 changed files with 7 additions and 2 deletions
|
@ -14,7 +14,7 @@ example = [[
|
||||||
script run dumptoemul -i dumpdata-foobar.bin
|
script run dumptoemul -i dumpdata-foobar.bin
|
||||||
]]
|
]]
|
||||||
usage = [[
|
usage = [[
|
||||||
script run dumptoemul [-i <file>] [-o <file>]
|
_script run dumptoemul [-i <file>] [-o <file>]
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
-h This help
|
-h This help
|
||||||
|
@ -108,8 +108,11 @@ local function main(args)
|
||||||
if infile == nil then
|
if infile == nil then
|
||||||
return oops('Could not read file ', input)
|
return oops('Could not read file ', input)
|
||||||
end
|
end
|
||||||
local dumpdata = readdump(infile)
|
|
||||||
|
local dumpdata = readdump(infile)
|
||||||
-- The hex-data is now in ascii-format,
|
-- The hex-data is now in ascii-format,
|
||||||
|
if dumpdata == NIL then return oops('Dumpfle not loaded') end
|
||||||
|
|
||||||
|
|
||||||
-- But first, check the uid
|
-- But first, check the uid
|
||||||
local uid = string.sub(dumpdata, 1, 8)
|
local uid = string.sub(dumpdata, 1, 8)
|
||||||
|
@ -117,6 +120,8 @@ local function main(args)
|
||||||
|
|
||||||
-- Format some linebreaks
|
-- Format some linebreaks
|
||||||
dumpdata = convert_to_emulform(dumpdata)
|
dumpdata = convert_to_emulform(dumpdata)
|
||||||
|
if dumpdata == NIL then return oops('Dumpfle not loaded') end
|
||||||
|
|
||||||
|
|
||||||
local outfile = io.open(output, 'w')
|
local outfile = io.open(output, 'w')
|
||||||
if outfile == nil then
|
if outfile == nil then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue