mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-20 03:48:33 +08:00
CHG: minor changes to this lua script. One case it returns NIL, which makes it behave better.
This commit is contained in:
parent
f2c2b174cd
commit
77d1a423d5
1 changed files with 6 additions and 5 deletions
|
@ -96,7 +96,7 @@ local function select1443b()
|
||||||
local result, infoReqb, infoAttrib, infoPong, err, resp, len, data
|
local result, infoReqb, infoAttrib, infoPong, err, resp, len, data
|
||||||
local goodReqbResponse = false
|
local goodReqbResponse = false
|
||||||
--REQB
|
--REQB
|
||||||
local p = 5
|
local p = 20
|
||||||
while p > 0 do
|
while p > 0 do
|
||||||
-- 05 00 08
|
-- 05 00 08
|
||||||
-- 05
|
-- 05
|
||||||
|
@ -122,10 +122,10 @@ local function select1443b()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- send some strange 0A/0C
|
-- send some strange 0A/0C
|
||||||
if ( p < 3) then
|
-- if ( p < 3) then
|
||||||
sendRaw('0A', 0, 0)
|
-- sendRaw('0A', 0, 0)
|
||||||
sendRaw('0C', 0, 0)
|
-- sendRaw('0C', 0, 0)
|
||||||
end
|
-- end
|
||||||
|
|
||||||
p = p - 1
|
p = p - 1
|
||||||
print('retrying')
|
print('retrying')
|
||||||
|
@ -200,6 +200,7 @@ local function waitFor14443b()
|
||||||
while not core.ukbhit() do
|
while not core.ukbhit() do
|
||||||
res, err = select1443b()
|
res, err = select1443b()
|
||||||
if res then return res end
|
if res then return res end
|
||||||
|
if res == nil then return nil, err end
|
||||||
-- err means that there was no response from card
|
-- err means that there was no response from card
|
||||||
end
|
end
|
||||||
return nil, "Aborted by user"
|
return nil, "Aborted by user"
|
||||||
|
|
Loading…
Add table
Reference in a new issue