]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
CHG: the default_toys.lua has the index bytes in mix endiansness. I tried to clean...
authoriceman1001 <iceman@iuse.se>
Sun, 5 Apr 2015 12:27:12 +0000 (14:27 +0200)
committericeman1001 <iceman@iuse.se>
Sun, 5 Apr 2015 12:27:12 +0000 (14:27 +0200)
CHG: The tnp3clone.lua is now faster, and uses the "wipe" parameter to clean the tag before writing all data.

client/lualibs/default_toys.lua
client/scripts/tnp3clone.lua

index 749686c75cfeecf06fa37f1315c483230cfd0b76..c985a542757910c2f93043375255f73651a98d91 100644 (file)
@@ -95,23 +95,39 @@ local _names = {
     --[[
        EXPANSION
     --]]
-       ["012C"]="DRAGONS PEAK",
-       ["012D"]="EMPIRE OF ICE",
-       ["012E"]="PIRATE SEAS",
-       ["012F"]="DARKLIGHT CRYPT",
-       ["0130"]="VOLCANIC VAULT",
-       ["0131"]="MIRROR OF MYSTERY",
-       ["0132"]="NIGHTMARE EXPRESS",
-       ["0133"]="SUNSCRAPER SPIRE",
-       ["0134"]="MIDNIGHT MUSEUM",
+       ["2C01"]="DRAGONS PEAK",
+       ["2D01"]="EMPIRE OF ICE",
+       ["2E01"]="PIRATE SEAS",
+       ["2F01"]="DARKLIGHT CRYPT",
+       ["3001"]="VOLCANIC VAULT",
+       ["3101"]="MIRROR OF MYSTERY",
+       ["3201"]="NIGHTMARE EXPRESS",
+       ["3301"]="SUNSCRAPER SPIRE",
+       ["3401"]="MIDNIGHT MUSEUM",
        
        --[[
        LEGENDARY
     --]]       
-       ["0194"]="LEGENDARY BASH",
-       ["01A0"]="LEGENDARY SPYRO",
-       ["01A3"]="LEGENDARY TRIGGER HAPPY",
-       ["01AE"]="LEGENDARY CHOPCHOP",
+       ["9401"]="LEGENDARY BASH",
+       ["A001"]="LEGENDARY SPYRO",
+       ["A301"]="LEGENDARY TRIGGER HAPPY",
+       ["AE01"]="LEGENDARY CHOPCHOP",
+       --legendary blades
+       --legendary bouncer
+       --legendary zoo lou
+       --legendary stealth elf
+       --legendary slam bam
+       --legendary night shift
+       --legendary jet-vac
+       --legendary ignitor
+       --legendary jawbreaker
+       --legendary lightcore grim creeper
+       --legendary lightcore chill
+       --legendary free ranger
+       
+       --[[
+       COLOR
+       --]]
        
        --[[
        TRAPTEAM
@@ -154,43 +170,43 @@ local _names = {
        ["E501"]="TRAPTEAM BLACKOUT",
 
        --[[
-       PET
+       PET / MINI
        --]]
-       ["01F6"]="PET BOP",
-       ["01F7"]="PET SPRY",
-       ["01F8"]="PET HIJINX",
-       ["01F9"]="PET TERRAFIN",
-       ["01FA"]="PET BREEZE",
-       ["01FB"]="PET WEERUPTOR",
-       ["01FC"]="PET PET VAC",
-       ["01FD"]="PET SMALL FRY",
-       ["01FE"]="PET DROBIT",
+       ["F601"]="PET BOP",
+       ["F701"]="PET SPRY",
+       ["F801"]="PET HIJINX",
+       ["F901"]="PET TERRAFIN",
+       ["FA01"]="PET BREEZE",
+       ["FB01"]="PET WEERUPTOR",
+       ["FC01"]="PET PET VAC",
+       ["FD01"]="PET SMALL FRY",
+       ["FE01"]="PET DROBIT",
        ["0202"]="PET GILL GRUNT",
-       ["0207"]="PET TRIGGER SNAPPY",
-       ["020E"]="PET WHISPER ELF",
-       ["021C"]="PET BARKLEY",
-       ["021D"]="PET THUMPLING",
-       ["021E"]="PET MINI JINI",
-       ["021F"]="PET EYE SMALL",
+       ["0702"]="PET TRIGGER SNAPPY",
+       ["0E02"]="PET WHISPER ELF",
+       ["1C02"]="PET BARKLEY",
+       ["1D02"]="PET THUMPLING",
+       ["1E02"]="PET MINI JINI",
+       ["1F02"]="PET EYE SMALL",
 
        --[[
        SWAP FORCE
        --]]
-       ["0BB8"]="SWAPFORCE SCRATCH",
-       ["0BB9"]="SWAPFORCE POPTHORN",
-       ["0BBA"]="SWAPFORCE SLOBBER TOOTH",
-       ["0BBB"]="SWAPFORCE SCORP",
-       ["0BBC"]="SWAPFORCE HOG WILD FRYNO",
-       ["0BBD"]="SWAPFORCE SMOLDER DASH",
-       ["0BBE"]="SWAPFORCE BUMBLE BLAST",
-       ["0BBF"]="SWAPFORCE ZOO LOU",
-       ["0BC0"]="SWAPFORCE DUNE BUG",
-       ["0BC1"]="SWAPFORCE STAR STRIKE",
-       ["0BC2"]="SWAPFORCE COUNTDOWN",
-       ["0BC3"]="SWAPFORCE WIND UP",
-       ["0BC4"]="SWAPFORCE ROLLER BRAWL",
-       ["0BC5"]="SWAPFORCE GRIM CREEPER",
-       ["0BC6"]="SWAPFORCE RIP TIDE",
-       ["0BC7"]="SWAPFORCE PUNK SHOCK",
+       ["B80B"]="SWAPFORCE SCRATCH",
+       ["B90B"]="SWAPFORCE POPTHORN",
+       ["BA0B"]="SWAPFORCE SLOBBER TOOTH",
+       ["BB0B"]="SWAPFORCE SCORP",
+       ["BC0B"]="SWAPFORCE HOG WILD FRYNO",
+       ["BD0B"]="SWAPFORCE SMOLDER DASH",
+       ["BE0B"]="SWAPFORCE BUMBLE BLAST",
+       ["BF0B"]="SWAPFORCE ZOO LOU",
+       ["C00B"]="SWAPFORCE DUNE BUG",
+       ["C10B"]="SWAPFORCE STAR STRIKE",
+       ["C20B"]="SWAPFORCE COUNTDOWN",
+       ["C30B"]="SWAPFORCE WIND UP",
+       ["C40B"]="SWAPFORCE ROLLER BRAWL",
+       ["C50B"]="SWAPFORCE GRIM CREEPER",
+       ["C60B"]="SWAPFORCE RIP TIDE",
+       ["C70B"]="SWAPFORCE PUNK SHOCK",
 }
 return _names
index 011e0a5729edf5915f573b6eac87230b407c2dd7..8c9397a780ced1a4939d19f8c08e3c5a9d93d5ee 100644 (file)
@@ -109,24 +109,28 @@ local function main(args)
                        return oops('failed reading block with chinese magic command.  quitting...')
                end
        end
-       local b1 = toytype..'000000000000000000000000'
        
+       -- wipe card.
+       local cmd  = (cset..' %s 0004 08 w'):format( b0)        
+       core.console(cmd) 
+
+       
+       local b1 = toytype..'000000000000000000000000'
        local calc = utils.Crc16(b0..b1)
        local calcEndian = bor(rsh(calc,8), lsh(band(calc, 0xff), 8))
        
        local cmd  = (cset..'1 %s%04x'):format( b1, calcEndian) 
-       core.console( cmd) 
+       core.console(cmd) 
        
        local pos, key
        for blockNo = 2, numBlocks-1, 1 do
                pos = (math.floor( blockNo / 4 ) * 12)+1
                key = akeys:sub(pos, pos + 11 )
-               if  blockNo%4 ~= 3 then
-                       cmd =  ('%s %d %s'):format(cset,blockNo,empty) 
-               else
+               if  blockNo%4 == 3 then
                        cmd =  ('%s %d %s%s'):format(cset,blockNo,key,AccAndKeyB) 
-               end
-               core.console(cmd)
+                       core.console(cmd)
+               end             
        end 
+       core.clearCommandBuffer()
 end
 main(args)
\ No newline at end of file
Impressum, Datenschutz