mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
convert to 14b apdu
This commit is contained in:
parent
1636309b36
commit
c0635b9045
1 changed files with 24 additions and 24 deletions
|
@ -32,7 +32,7 @@ device-side.
|
||||||
local function calypso_parse(result)
|
local function calypso_parse(result)
|
||||||
local r = Command.parse(result)
|
local r = Command.parse(result)
|
||||||
if r.arg1 >= 0 then
|
if r.arg1 >= 0 then
|
||||||
local len = r.arg2 * 2
|
local len = r.arg1 * 2
|
||||||
if len > 0 then
|
if len > 0 then
|
||||||
r.data = string.sub(r.data, 0, len);
|
r.data = string.sub(r.data, 0, len);
|
||||||
return r, nil
|
return r, nil
|
||||||
|
@ -113,8 +113,9 @@ end
|
||||||
local function calypso_send_cmd_raw(data, ignoreresponse )
|
local function calypso_send_cmd_raw(data, ignoreresponse )
|
||||||
|
|
||||||
local command, flags, result, err
|
local command, flags, result, err
|
||||||
flags = lib14b.ISO14B_COMMAND.ISO14B_RAW +
|
flags = lib14b.ISO14B_COMMAND.ISO14B_APDU
|
||||||
lib14b.ISO14B_COMMAND.ISO14B_APPEND_CRC
|
-- flags = lib14b.ISO14B_COMMAND.ISO14B_RAW +
|
||||||
|
-- lib14b.ISO14B_COMMAND.ISO14B_APPEND_CRC
|
||||||
|
|
||||||
data = data or "00"
|
data = data or "00"
|
||||||
|
|
||||||
|
@ -162,6 +163,7 @@ local function calypso_apdu_status(apdu)
|
||||||
return status, desc, err
|
return status, desc, err
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local CLA = '94'
|
||||||
local _calypso_cmds = {
|
local _calypso_cmds = {
|
||||||
|
|
||||||
-- Break down of command bytes:
|
-- Break down of command bytes:
|
||||||
|
@ -184,27 +186,25 @@ local _calypso_cmds = {
|
||||||
-- Electronic Purse file
|
-- Electronic Purse file
|
||||||
-- Electronic Transaction log file
|
-- Electronic Transaction log file
|
||||||
|
|
||||||
|
['01.Select ICC file'] = CLA..'a4 080004 3f00 0002',
|
||||||
--['01.Select ICC file'] = '0294 a4 00 0002 3f00',
|
['02.ICC'] = CLA..'b2 01 041d',
|
||||||
['01.Select ICC file'] = '0294 a4 080004 3f00 0002',
|
['03.Select EnvHol file'] = CLA..'a4 080004 2000 2001',
|
||||||
['02.ICC'] = '0394 b2 01 041d',
|
['04.EnvHol1'] = CLA..'b2 01 041d',
|
||||||
['03.Select EnvHol file'] = '0294 a4 080004 2000 2001',
|
['05.Select EvLog file'] = CLA..'a4 080004 2000 2010',
|
||||||
['04.EnvHol1'] = '0394 b2 01 041d',
|
['06.EvLog1'] = CLA..'b2 01 041d',
|
||||||
['05.Select EvLog file'] = '0294 a4 080004 2000 2010',
|
['07.EvLog2'] = CLA..'b2 02 041d',
|
||||||
['06.EvLog1'] = '0394 b2 01 041d',
|
['08.EvLog3'] = CLA..'b2 03 041d',
|
||||||
['07.EvLog2'] = '0294 b2 02 041d',
|
['09.Select ConList file']= CLA..'a4 080004 2000 2050',
|
||||||
['08.EvLog3'] = '0394 b2 03 041d',
|
['10.ConList'] = CLA..'b2 01 041d',
|
||||||
['09.Select ConList file']= '0294 a4 080004 2000 2050',
|
['11.Select Contra file'] = CLA..'a4 080004 2000 2020',
|
||||||
['10.ConList'] = '0394 b2 01 041d',
|
['12.Contra1'] = CLA..'b2 01 041d',
|
||||||
['11.Select Contra file'] = '0294 a4 080004 2000 2020',
|
['13.Contra2'] = CLA..'b2 02 041d',
|
||||||
['12.Contra1'] = '0394 b2 01 041d',
|
['14.Contra3'] = CLA..'b2 03 041d',
|
||||||
['13.Contra2'] = '0294 b2 02 041d',
|
['15.Contra4'] = CLA..'b2 04 041d',
|
||||||
['14.Contra3'] = '0394 b2 03 041d',
|
['16.Select Counter file']= CLA..'a4 080004 2000 2069',
|
||||||
['15.Contra4'] = '0294 b2 04 041d',
|
['17.Counter'] = CLA..'b2 01 041d',
|
||||||
['16.Select Counter file']= '0394 a4 080004 2000 2069',
|
['18.Select SpecEv file'] = CLA..'a4 080004 2000 2040',
|
||||||
['17.Counter'] = '0294 b2 01 041d',
|
['19.SpecEv1'] = CLA..'b2 01 041d',
|
||||||
['18.Select SpecEv file'] = '0394 a4 080004 2000 2040',
|
|
||||||
['19.SpecEv1'] = '0294 b2 01 041d',
|
|
||||||
}
|
}
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue