]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/scripts/formatMifare.lua
Adjust LUA scripts to new ISO14A_NO_RATS option
[proxmark3-svn] / client / scripts / formatMifare.lua
index 1ced0c28d245f02c01b347ffa032b37b7075998e..56397acd0441f91aeddcf4000f4735573bdf04d1 100644 (file)
@@ -71,7 +71,7 @@ end
 --\r
 -- Read information from a card\r
 function GetCardInfo()\r
-       result, err = lib14a.read1443a(false)\r
+       result, err = lib14a.read1443a(false, true)\r
        if not result then\r
                print(err)\r
                return\r
@@ -80,18 +80,20 @@ function GetCardInfo()
 \r
        core.clearCommandBuffer()\r
        \r
-       if 0x18 == result.sak then --NXP MIFARE Classic 4k | Plus 4k\r
+       if 0x18 == result.sak then -- NXP MIFARE Classic 4k | Plus 4k\r
                -- IFARE Classic 4K offers 4096 bytes split into forty sectors, \r
                -- of which 32 are same size as in the 1K with eight more that are quadruple size sectors. \r
                numSectors = 40\r
-       elseif 0x08 == result.sak then -- NXP MIFARE CLASSIC 1k | Plus 2k\r
+       elseif 0x08 == result.sak then  -- NXP MIFARE CLASSIC 1k | Plus 2k\r
                -- 1K offers 1024 bytes of data storage, split into 16 sector\r
                numSectors = 16\r
-       elseif 0x09 == result.sak then -- NXP MIFARE Mini 0.3k\r
+       elseif 0x09 == result.sak then  -- NXP MIFARE Mini 0.3k\r
                -- MIFARE Classic mini offers 320 bytes split into five sectors.\r
                numSectors = 5\r
-       elseif  0x10 == result.sak then-- "NXP MIFARE Plus 2k"\r
+       elseif  0x10 == result.sak then -- NXP MIFARE Plus 2k\r
                numSectors = 32\r
+       elseif  0x01 == result.sak then -- NXP MIFARE TNP3xxx 1K\r
+               numSectors = 16\r
        else\r
                print("I don't know how many sectors there are on this type of card, defaulting to 16")\r
        end     \r
Impressum, Datenschutz