mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-09 01:36:52 +08:00
fix: proper exit with script fails to find any crc models.
This commit is contained in:
parent
54f0c188dd
commit
2b34fbec0c
1 changed files with 4 additions and 2 deletions
|
@ -25,7 +25,7 @@ end
|
|||
---
|
||||
-- This is only meant to be used when errors occur
|
||||
function oops(err)
|
||||
print("ERROR: ",err)
|
||||
print("[!] ERROR: ",err)
|
||||
return nil,err
|
||||
end
|
||||
---
|
||||
|
@ -58,6 +58,8 @@ function main(args)
|
|||
print( ('%-20s| %-16s| %s'):format('Model','CRC', 'CRC reverse','bigEnd', 'bigEnd','little','little'))
|
||||
print( string.rep('-',60) )
|
||||
local lists = core.reveng_models(width)
|
||||
if lists == nil then return oops("Couldn't find any CRC algos with that width") end
|
||||
|
||||
for _,i in pairs(lists) do
|
||||
local a1 = core.reveng_runmodel(i, data, false, '0')
|
||||
local a2 = core.reveng_runmodel(i, data, true, '0')
|
||||
|
|
Loading…
Reference in a new issue