chg: 'script run mifare_ad' - minor fix
This commit is contained in:
@@ -146,9 +146,8 @@ local function main( args)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local tag, err = lib14a.read(false, true)
|
local tag, err = lib14a.read(false, true)
|
||||||
if not tag then return oops(err) end
|
if not tag then return oops("No card present") end
|
||||||
core.clearCommandBuffer()
|
core.clearCommandBuffer()
|
||||||
if (tag==nil) then oops("No card present") return end
|
|
||||||
print(("UID: %s"):format(tag.uid))
|
print(("UID: %s"):format(tag.uid))
|
||||||
|
|
||||||
-- First, get block 1 byte 1
|
-- First, get block 1 byte 1
|
||||||
@@ -160,6 +159,7 @@ local function main( args)
|
|||||||
if block == "0F" then
|
if block == "0F" then
|
||||||
print('Card has MADs v1')
|
print('Card has MADs v1')
|
||||||
end
|
end
|
||||||
|
--(iceman) Should be able to detect MAD v2 aswell..
|
||||||
|
|
||||||
-- Deactivate field
|
-- Deactivate field
|
||||||
close()
|
close()
|
||||||
|
|||||||
Reference in New Issue
Block a user