mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-22 06:13:27 -07:00
Added keys for writePerso().
This commit is contained in:
parent
a508482ae7
commit
7fe4589d21
1 changed files with 21 additions and 4 deletions
|
@ -109,6 +109,22 @@ function writePerso()
|
||||||
--L1L3MixSectorSwitchKey
|
--L1L3MixSectorSwitchKey
|
||||||
blocknum = "9007"
|
blocknum = "9007"
|
||||||
writeBlock(blocknum, SIXTEEN_BYTES_ZEROS)
|
writeBlock(blocknum, SIXTEEN_BYTES_ZEROS)
|
||||||
|
--VC Keys
|
||||||
|
--VCProximityKey
|
||||||
|
blocknum = "A001"
|
||||||
|
writeBlock(blocknum, SIXTEEN_BYTES_ZEROS)
|
||||||
|
--VCSelectENCKey
|
||||||
|
blocknum = "A080"
|
||||||
|
writeBlock(blocknum, SIXTEEN_BYTES_ZEROS)
|
||||||
|
--VCSelectMACKey
|
||||||
|
blocknum = "A081"
|
||||||
|
writeBlock(blocknum, SIXTEEN_BYTES_ZEROS)
|
||||||
|
--TransactionMACKey1
|
||||||
|
blocknum = "C000"
|
||||||
|
writeBlock(blocknum, SIXTEEN_BYTES_ZEROS)
|
||||||
|
--TransactionMACConfKey1
|
||||||
|
blocknum = "C001"
|
||||||
|
writeBlock(blocknum, SIXTEEN_BYTES_ZEROS)
|
||||||
print("Finished setting misc keys.")
|
print("Finished setting misc keys.")
|
||||||
|
|
||||||
print("WritePerso finished! Card is ready to move into new security level.")
|
print("WritePerso finished! Card is ready to move into new security level.")
|
||||||
|
@ -138,7 +154,8 @@ function getVersion()
|
||||||
end
|
end
|
||||||
|
|
||||||
function commitPerso()
|
function commitPerso()
|
||||||
commandString = COMMITPERSO .. "01" --switch to SL1
|
-- commandString = COMMITPERSO .. "01" --switch to SL1
|
||||||
|
commandString = COMMITPERSO .. "03" --switch to SL3
|
||||||
response = sendRaw(commandString, true, true) --0x90 is returned upon success
|
response = sendRaw(commandString, true, true) --0x90 is returned upon success
|
||||||
if string.sub(response, 3, 4) ~= "90" then
|
if string.sub(response, 3, 4) ~= "90" then
|
||||||
oops("error occurred while trying to switch security level")
|
oops("error occurred while trying to switch security level")
|
||||||
|
@ -177,15 +194,15 @@ function main(args)
|
||||||
--writePerso()
|
--writePerso()
|
||||||
--commitPerso()
|
--commitPerso()
|
||||||
--getVersion()
|
--getVersion()
|
||||||
--proximityCheck()
|
proximityCheck()
|
||||||
|
|
||||||
-- attempt to read VCProximityKey at block A001
|
-- attempt to read VCProximityKey at block A001
|
||||||
-- commandString = READPLAINNOMACUNMACED .. "01A0" .. "01"
|
-- commandString = READPLAINNOMACUNMACED .. "01A0" .. "01"
|
||||||
-- response = sendRaw(commandString, true, true)
|
-- response = sendRaw(commandString, true, true)
|
||||||
|
|
||||||
-- authenticate with CardConfigurationKey
|
-- authenticate with CardConfigurationKey
|
||||||
commandString = AUTH_FIRST .. "0190" .. "00"
|
-- commandString = AUTH_FIRST .. "0190" .. "00"
|
||||||
response = sendRaw(commandString, true, true)
|
-- response = sendRaw(commandString, true, true)
|
||||||
|
|
||||||
-- Power off the Proxmark
|
-- Power off the Proxmark
|
||||||
sendRaw(POWEROFF, false, false)
|
sendRaw(POWEROFF, false, false)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue