X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/9484ff3d6eeff3bea9ff1547f753a97e85c94f13..a31f7f899b6d62c94bc236fce4330d6bbb8996e7:/client/scripts/formatMifare.lua?ds=sidebyside

diff --git a/client/scripts/formatMifare.lua b/client/scripts/formatMifare.lua
index 0d735e98..2861b542 100644
--- a/client/scripts/formatMifare.lua
+++ b/client/scripts/formatMifare.lua
@@ -71,7 +71,7 @@ end
 --
 -- Read information from a card
 function GetCardInfo()
-	result, err = lib14a.read1443a(false)
+	result, err = lib14a.read14443a(false, true)
 	if not result then
 		print(err)
 		return
@@ -80,19 +80,19 @@ function GetCardInfo()
 
 	core.clearCommandBuffer()
 	
-	if 0x18 == result.sak then --NXP MIFARE Classic 4k | Plus 4k
+	if 0x18 == result.sak then -- NXP MIFARE Classic 4k | Plus 4k
 		-- IFARE Classic 4K offers 4096 bytes split into forty sectors, 
 		-- of which 32 are same size as in the 1K with eight more that are quadruple size sectors. 
 		numSectors = 40
-	elseif 0x08 == result.sak then -- NXP MIFARE CLASSIC 1k | Plus 2k
+	elseif 0x08 == result.sak then  -- NXP MIFARE CLASSIC 1k | Plus 2k
 		-- 1K offers 1024 bytes of data storage, split into 16 sector
 		numSectors = 16
-	elseif 0x09 == result.sak then -- NXP MIFARE Mini 0.3k
+	elseif 0x09 == result.sak then  -- NXP MIFARE Mini 0.3k
 		-- MIFARE Classic mini offers 320 bytes split into five sectors.
 		numSectors = 5
 	elseif  0x10 == result.sak then -- NXP MIFARE Plus 2k
 		numSectors = 32
-	elseif  0x01 == sak then        -- NXP MIFARE TNP3xxx 1K
+	elseif  0x01 == result.sak then -- NXP MIFARE TNP3xxx 1K
 		numSectors = 16
 	else
 		print("I don't know how many sectors there are on this type of card, defaulting to 16")