mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-22 06:13:27 -07:00
Updated number of sectors for 2k cards.
This commit is contained in:
parent
ff9ab74fb1
commit
b47b50dc8a
2 changed files with 3 additions and 1 deletions
BIN
.DS_Store
vendored
Normal file
BIN
.DS_Store
vendored
Normal file
Binary file not shown.
|
@ -73,8 +73,10 @@ function writePerso()
|
|||
cardsize = 4 --need to set to 4 for 4k or 2 for 2k
|
||||
if(cardsize == 4) then
|
||||
numblocks = 255
|
||||
numsectors = 39
|
||||
elseif(cardsize == 2) then
|
||||
numblocks = 127
|
||||
numsectors = 31
|
||||
else
|
||||
oops("Invalid card size")
|
||||
end
|
||||
|
@ -88,7 +90,7 @@ function writePerso()
|
|||
|
||||
print("Setting AES Sector keys")
|
||||
-- Next, write to the AES sector keys
|
||||
for i=0,39 do --for each sector number
|
||||
for i=0,numsectors do --for each sector number
|
||||
local keyA_block = "40" .. string.format("%02x", i * 2)
|
||||
local keyB_block = "40" .. string.format("%02x", (i * 2) + 1)
|
||||
--Can also calculate the keys fancily to make them unique, if desired
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue