mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
refactor: mfDarkside error code
This commit is contained in:
parent
970c2d0999
commit
5e9533a792
4 changed files with 63 additions and 70 deletions
|
@ -186,14 +186,7 @@ local function main(args)
|
|||
-- Crack it
|
||||
local cnt
|
||||
err, res = core.mfDarkside()
|
||||
if err == -1 then return oops('Button pressed. Aborted.')
|
||||
elseif err == -2 then return oops([[Card is not vulnerable to Darkside attack (doesn't send NACK on authentication requests).]])
|
||||
elseif err == -3 then return oops([[Card is not vulnerable to Darkside attack (its random number generator is not predictable).]])
|
||||
elseif err == -4 then return oops([[
|
||||
Card is not vulnerable to Darkside attack (its random number generator seems to be based on the wellknown
|
||||
generating polynomial with 16 effective bits only, but shows unexpected behaviour.]])
|
||||
elseif err == -5 then return oops('aborted via keyboard.')
|
||||
end
|
||||
if err ~= 0 then return oops('Darkside attack failed.') end
|
||||
-- The key is actually 8 bytes, so a
|
||||
-- 6-byte key is sent as 00XXXXXX
|
||||
-- This means we unpack it as first
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue