mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-10-22 13:12:21 +00:00
fix: proper exit with script fails to find any crc models.
This commit is contained in:
1 parent
54f0c188dd
commit
2b34fbec0c
1 file changed
+4
-2
@@ -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
|
||||
---
|
||||
@@ -57,7 +57,9 @@ function main(args)
|
||||
print('')
|
||||
print( ('%-20s| %-16s| %s'):format('Model','CRC', 'CRC reverse','bigEnd', 'bigEnd','little','little'))
|
||||
print( string.rep('-',60) )
|
||||
local lists = core.reveng_models(width)
|
||||
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')
|
||||
|
||||
Reference in new issue
Block a user