]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/scripts/hard_autopwn.lua
FIX: introduced a bug in luascripts when adding the "safe ascii chars" to ConvertHex...
[proxmark3-svn] / client / scripts / hard_autopwn.lua
index a4eb8eb704b4748f8a821b896aa4ac2806a8b0f2..d320e1a66d1bfb22de90e80add341da40031c7ab 100644 (file)
@@ -127,13 +127,11 @@ function main(args)
        -- Turn off Debug
        local cmdSetDbgOff = "hf mf dbg 0"
        core.console( cmdSetDbgOff) 
+       core.clearCommandBuffer()
        -- identify tag
        result, err = lib14a.read1443a(false)
-       if not result then
-               return oops(err)
-       end
-       core.clearCommandBuffer()
-       
+       if not result then return oops(err) end
+
        -- Show tag info
        print((' Found tag %s'):format(result.name))
        
@@ -168,7 +166,7 @@ function main(args)
                        -- or actually blockNo and keytype
                        -- just try default for now
                        if sector == 1 and targetkeytype == 0 then
-                               keyA = tonumber(key)
+                               keyA = utils.ConvertHexToAscii(key)
                        else
                                local err, foundkey = core.hardnested(blockno, keytype, key, trgblockno, tostring(targetkeytype), trgkey, 0,0,0,0)
                                foundkey = foundkey or ""
Impressum, Datenschutz