mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-22 06:13:27 -07:00
Added ability to send Proximity Check in multiple chunks.
This commit is contained in:
parent
1b1d843ab3
commit
d1b56172c6
1 changed files with 14 additions and 3 deletions
|
@ -205,9 +205,20 @@ function proximityCheck()
|
|||
|
||||
--PC--
|
||||
RndC = "0001020304050607" --Random Challenge
|
||||
commandString = PROXIMITYCHECK .. "08" .. RndC
|
||||
response = sendRaw(commandString, true, true)
|
||||
RndR = string.sub(response, 3, 18)
|
||||
num_rounds = 8 --Needs to be 1, 2, 4, or 8
|
||||
part_len = 8 / num_rounds
|
||||
j = 1
|
||||
RndR = ""
|
||||
for i = 1,num_rounds do
|
||||
pRndC = ""
|
||||
for q = 1,(part_len*2) do
|
||||
pRndC = pRndC .. string.sub(RndC,j,j)
|
||||
j = j + 1
|
||||
end
|
||||
commandString = PROXIMITYCHECK .. "0" .. tostring(part_len) .. pRndC
|
||||
pRndR = string.sub(sendRaw(commandString, true, true), 3, 3+part_len)
|
||||
RndR = RndR .. pRndR
|
||||
end
|
||||
print("RndC = " .. RndC .. " RndR = " .. RndR)
|
||||
|
||||
--VerifyPC--
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue