]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
Fix empty key list bug in mfkeys.lua (#579)
authorAnthraX1 <AnthraX1@users.noreply.github.com>
Fri, 30 Mar 2018 15:54:45 +0000 (02:54 +1100)
committerpwpiwi <pwpiwi@users.noreply.github.com>
Fri, 30 Mar 2018 15:54:45 +0000 (17:54 +0200)
When input key list size is greater than 85, table.concat() returns empty because the last parameter is the end offset not the increment value.

client/scripts/mfkeys.lua

index 33027d3147784ed4233f19e7df70e757342361f3..671ce03dd10aa3e6cca970acfa100c3b558d350e 100644 (file)
@@ -57,7 +57,7 @@ function checkBlock(blockNo, keys, keyType)
        while remaining > 0 do
                local n,data = remaining, nil
                if remaining > 85 then n = 85 end
        while remaining > 0 do
                local n,data = remaining, nil
                if remaining > 85 then n = 85 end
-               local data = table.concat(keys,"",start,n)
+               local data = table.concat(keys, "", start, start + n - 1)
                --print("data",data)
                --print("data len", #data)
                print(("Testing block %d, keytype %d, with %d keys"):format(blockNo, keyType, n))
                --print("data",data)
                --print("data len", #data)
                print(("Testing block %d, keytype %d, with %d keys"):format(blockNo, keyType, n))
Impressum, Datenschutz