mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
style
This commit is contained in:
parent
e89ec244cd
commit
5b31211971
12 changed files with 143 additions and 129 deletions
|
@ -369,7 +369,7 @@ static void cook_ats(packet_t *ats, uint8_t fwi, uint8_t sfgi) {
|
||||||
}
|
}
|
||||||
|
|
||||||
packet_t cooked_ats = { 0 };
|
packet_t cooked_ats = { 0 };
|
||||||
cooked_ats.len = 5+historical_len;
|
cooked_ats.len = 5 + historical_len;
|
||||||
cooked_ats.dat[0] = cooked_ats.len;
|
cooked_ats.dat[0] = cooked_ats.len;
|
||||||
cooked_ats.dat[1] = t0;
|
cooked_ats.dat[1] = t0;
|
||||||
cooked_ats.dat[2] = ta;
|
cooked_ats.dat[2] = ta;
|
||||||
|
@ -377,7 +377,7 @@ static void cook_ats(packet_t *ats, uint8_t fwi, uint8_t sfgi) {
|
||||||
cooked_ats.dat[4] = tc;
|
cooked_ats.dat[4] = tc;
|
||||||
|
|
||||||
if (historical_len > 0) {
|
if (historical_len > 0) {
|
||||||
memcpy(cooked_ats.dat+5, historical_bytes, historical_len);
|
memcpy(cooked_ats.dat + 5, historical_bytes, historical_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(ats, &cooked_ats, sizeof(packet_t));
|
memcpy(ats, &cooked_ats, sizeof(packet_t));
|
||||||
|
@ -479,7 +479,7 @@ static void read_packet(packet_t *packet) {
|
||||||
DbpString(_CYAN_("[@]") " PM3 NG packet recieved - ignoring");
|
DbpString(_CYAN_("[@]") " PM3 NG packet recieved - ignoring");
|
||||||
|
|
||||||
// clear any remaining buffered data
|
// clear any remaining buffered data
|
||||||
while(cardhopper_data_available()) {
|
while (cardhopper_data_available()) {
|
||||||
cardhopper_read(packet->dat, 255);
|
cardhopper_read(packet->dat, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -466,7 +466,7 @@ static void iso14b_set_fwt(uint8_t fwt) {
|
||||||
s_iso14b_fwt = fwt;
|
s_iso14b_fwt = fwt;
|
||||||
if (g_dbglevel >= DBG_DEBUG) {
|
if (g_dbglevel >= DBG_DEBUG) {
|
||||||
Dbprintf("ISO14443B FWT Timeout set to %ld fwt", s_iso14b_fwt);
|
Dbprintf("ISO14443B FWT Timeout set to %ld fwt", s_iso14b_fwt);
|
||||||
}
|
}
|
||||||
iso14b_set_timeout(32 << fwt);
|
iso14b_set_timeout(32 << fwt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1412,7 +1412,7 @@ static int Get14443bAnswerFromTag(uint8_t *response, uint16_t max_len, uint32_t
|
||||||
(Demod.len * (8 + 2)) // time for byte transfers
|
(Demod.len * (8 + 2)) // time for byte transfers
|
||||||
+ (10 + 2) // time for SOF transfer
|
+ (10 + 2) // time for SOF transfer
|
||||||
+ (10) // time for EOF transfer
|
+ (10) // time for EOF transfer
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
LogTrace(Demod.output, Demod.len, sof_time, *eof_time, NULL, false);
|
LogTrace(Demod.output, Demod.len, sof_time, *eof_time, NULL, false);
|
||||||
}
|
}
|
||||||
|
@ -1672,7 +1672,7 @@ int iso14443b_apdu(uint8_t const *msg, size_t msg_len, bool send_chaining, void
|
||||||
|
|
||||||
if ((len >= 3) && // PCB + CRC = 3 bytes
|
if ((len >= 3) && // PCB + CRC = 3 bytes
|
||||||
(((data_bytes[0] & 0xC0) == 0) || (data_bytes[0] & 0xD0) == 0x80) && // I-Block OR R-Block with ACK bit set to 0
|
(((data_bytes[0] & 0xC0) == 0) || (data_bytes[0] & 0xD0) == 0x80) && // I-Block OR R-Block with ACK bit set to 0
|
||||||
((data_bytes[0] & 0x01) == s_iso14b_pcb_blocknum)) { // equal block numbers
|
((data_bytes[0] & 0x01) == s_iso14b_pcb_blocknum)) { // equal block numbers
|
||||||
|
|
||||||
s_iso14b_pcb_blocknum ^= 1;
|
s_iso14b_pcb_blocknum ^= 1;
|
||||||
|
|
||||||
|
@ -1689,7 +1689,7 @@ int iso14443b_apdu(uint8_t const *msg, size_t msg_len, bool send_chaining, void
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// cut frame byte
|
// cut frame byte
|
||||||
if (len) {
|
if (len) {
|
||||||
len -= 1;
|
len -= 1;
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void iso14443b_setup(void);
|
void iso14443b_setup(void);
|
||||||
int iso14443b_apdu(uint8_t const *msg, size_t msg_len, bool send_chaining, void *rxdata, uint16_t rxmaxlen, uint8_t *res, uint16_t * responselen);
|
int iso14443b_apdu(uint8_t const *msg, size_t msg_len, bool send_chaining, void *rxdata, uint16_t rxmaxlen, uint8_t *res, uint16_t *responselen);
|
||||||
|
|
||||||
int iso14443b_select_card(iso14b_card_select_t *card);
|
int iso14443b_select_card(iso14b_card_select_t *card);
|
||||||
|
|
||||||
|
|
|
@ -2680,17 +2680,17 @@ void SetTag15693Uid(const uint8_t *uid) {
|
||||||
|
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
res = SendDataTag(
|
res = SendDataTag(
|
||||||
cmd[i],
|
cmd[i],
|
||||||
sizeof(cmd[i]),
|
sizeof(cmd[i]),
|
||||||
(i == 0) ? true : false,
|
(i == 0) ? true : false,
|
||||||
true,
|
true,
|
||||||
buf,
|
buf,
|
||||||
sizeof(buf),
|
sizeof(buf),
|
||||||
start_time,
|
start_time,
|
||||||
ISO15693_READER_TIMEOUT_WRITE,
|
ISO15693_READER_TIMEOUT_WRITE,
|
||||||
&eof_time,
|
&eof_time,
|
||||||
&recvlen
|
&recvlen
|
||||||
);
|
);
|
||||||
|
|
||||||
start_time = eof_time + DELAY_ISO15693_VICC_TO_VCD_READER;
|
start_time = eof_time + DELAY_ISO15693_VICC_TO_VCD_READER;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1259,14 +1259,14 @@ static int CmdHF14AAPDU(const char *Cmd) {
|
||||||
"Sends an ISO 7816-4 APDU via ISO 14443-4 block transmission protocol (T=CL).\n"
|
"Sends an ISO 7816-4 APDU via ISO 14443-4 block transmission protocol (T=CL).\n"
|
||||||
"Works with all APDU types from ISO 7816-4:2013\n"
|
"Works with all APDU types from ISO 7816-4:2013\n"
|
||||||
"\n"
|
"\n"
|
||||||
"note:\n"
|
"note:\n"
|
||||||
" `-m` and `-d` goes hand in hand\n"
|
" `-m` and `-d` goes hand in hand\n"
|
||||||
" -m <CLA INS P1 P2> -d 325041592E5359532E4444463031\n"
|
" -m <CLA INS P1 P2> -d 325041592E5359532E4444463031\n"
|
||||||
"\n"
|
"\n"
|
||||||
" OR\n"
|
" OR\n"
|
||||||
"\n"
|
"\n"
|
||||||
" use `-d` with complete APDU data\n"
|
" use `-d` with complete APDU data\n"
|
||||||
" -d 00A404000E325041592E5359532E444446303100",
|
" -d 00A404000E325041592E5359532E444446303100",
|
||||||
"hf 14a apdu -st -d 00A404000E325041592E5359532E444446303100\n"
|
"hf 14a apdu -st -d 00A404000E325041592E5359532E444446303100\n"
|
||||||
"hf 14a apdu -sd -d 00A404000E325041592E5359532E444446303100 -> decode apdu\n"
|
"hf 14a apdu -sd -d 00A404000E325041592E5359532E444446303100 -> decode apdu\n"
|
||||||
"hf 14a apdu -sm 00A40400 -d 325041592E5359532E4444463031 -l 256 -> encode standard apdu\n"
|
"hf 14a apdu -sm 00A40400 -d 325041592E5359532E4444463031 -l 256 -> encode standard apdu\n"
|
||||||
|
|
|
@ -1840,11 +1840,11 @@ static uint32_t srix4k_get_magicbytes(uint64_t uid, uint32_t block6, uint32_t bl
|
||||||
}
|
}
|
||||||
|
|
||||||
static int CmdSRIX4kValid(const char *Cmd) {
|
static int CmdSRIX4kValid(const char *Cmd) {
|
||||||
CLIParserContext *ctx;
|
CLIParserContext *ctx;
|
||||||
CLIParserInit(&ctx, "hf 14b valid",
|
CLIParserInit(&ctx, "hf 14b valid",
|
||||||
"SRIX checksum test",
|
"SRIX checksum test",
|
||||||
"hf 14b valid\n"
|
"hf 14b valid\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
void *argtable[] = {
|
void *argtable[] = {
|
||||||
arg_param_begin,
|
arg_param_begin,
|
||||||
|
@ -2220,10 +2220,10 @@ static int CmdHF14BAPDU(const char *Cmd) {
|
||||||
|
|
||||||
PrintAndLogEx(INFO, "<<<< %s", sprint_hex(data, datalen));
|
PrintAndLogEx(INFO, "<<<< %s", sprint_hex(data, datalen));
|
||||||
PrintAndLogEx(SUCCESS, "APDU response: " _YELLOW_("%02x %02x") " - %s"
|
PrintAndLogEx(SUCCESS, "APDU response: " _YELLOW_("%02x %02x") " - %s"
|
||||||
, data[datalen - 2]
|
, data[datalen - 2]
|
||||||
, data[datalen - 1]
|
, data[datalen - 1]
|
||||||
, GetAPDUCodeDescription(data[datalen - 2], data[datalen - 1])
|
, GetAPDUCodeDescription(data[datalen - 2], data[datalen - 1])
|
||||||
);
|
);
|
||||||
|
|
||||||
// TLV decoder
|
// TLV decoder
|
||||||
if (decode_TLV && datalen > 4) {
|
if (decode_TLV && datalen > 4) {
|
||||||
|
|
|
@ -1086,7 +1086,7 @@ static int CmdTraceExtract(const char *Cmd) {
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintAndLogEx(SUCCESS, "Recorded activity ( " _YELLOW_("%u") " bytes )" , gs_traceLen);
|
PrintAndLogEx(SUCCESS, "Recorded activity ( " _YELLOW_("%u") " bytes )", gs_traceLen);
|
||||||
if (gs_traceLen == 0) {
|
if (gs_traceLen == 0) {
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -1320,7 +1320,7 @@ int CmdTraceList(const char *Cmd) {
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintAndLogEx(SUCCESS, "Recorded activity ( " _YELLOW_("%u") " bytes )" , gs_traceLen);
|
PrintAndLogEx(SUCCESS, "Recorded activity ( " _YELLOW_("%u") " bytes )", gs_traceLen);
|
||||||
if (gs_traceLen == 0) {
|
if (gs_traceLen == 0) {
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,30 +189,30 @@ int Iso7816ExchangeEx(Iso7816CommandChannel channel, bool activate_field, bool l
|
||||||
|
|
||||||
int Iso7816Exchange(Iso7816CommandChannel channel, bool leave_field_on, sAPDU_t apdu, uint8_t *result, size_t max_result_len, size_t *result_len, uint16_t *sw) {
|
int Iso7816Exchange(Iso7816CommandChannel channel, bool leave_field_on, sAPDU_t apdu, uint8_t *result, size_t max_result_len, size_t *result_len, uint16_t *sw) {
|
||||||
return Iso7816ExchangeEx(channel
|
return Iso7816ExchangeEx(channel
|
||||||
, false
|
, false
|
||||||
, leave_field_on
|
, leave_field_on
|
||||||
, apdu
|
, apdu
|
||||||
, false
|
, false
|
||||||
, 0
|
, 0
|
||||||
, result
|
, result
|
||||||
, max_result_len
|
, max_result_len
|
||||||
, result_len
|
, result_len
|
||||||
, sw
|
, sw
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Iso7816Select(Iso7816CommandChannel channel, bool activate_field, bool leave_field_on, uint8_t *aid, size_t aid_len,
|
int Iso7816Select(Iso7816CommandChannel channel, bool activate_field, bool leave_field_on, uint8_t *aid, size_t aid_len,
|
||||||
uint8_t *result, size_t max_result_len, size_t *result_len, uint16_t *sw) {
|
uint8_t *result, size_t max_result_len, size_t *result_len, uint16_t *sw) {
|
||||||
|
|
||||||
return Iso7816ExchangeEx(channel
|
return Iso7816ExchangeEx(channel
|
||||||
, activate_field
|
, activate_field
|
||||||
, leave_field_on
|
, leave_field_on
|
||||||
, (sAPDU_t) {0x00, 0xa4, 0x04, 0x00, aid_len, aid}
|
, (sAPDU_t) {0x00, 0xa4, 0x04, 0x00, aid_len, aid}
|
||||||
, (channel == CC_CONTACTLESS)
|
, (channel == CC_CONTACTLESS)
|
||||||
, 0
|
, 0
|
||||||
, result
|
, result
|
||||||
, max_result_len
|
, max_result_len
|
||||||
, result_len
|
, result_len
|
||||||
, sw
|
, sw
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -157,18 +157,19 @@ const static vocabulary_t vocabulary[] = {
|
||||||
{ 0, "hf 14a ndefread" },
|
{ 0, "hf 14a ndefread" },
|
||||||
{ 0, "hf 14a ndefwrite" },
|
{ 0, "hf 14a ndefwrite" },
|
||||||
{ 1, "hf 14b help" },
|
{ 1, "hf 14b help" },
|
||||||
|
{ 1, "hf 14b list" },
|
||||||
{ 0, "hf 14b apdu" },
|
{ 0, "hf 14b apdu" },
|
||||||
{ 0, "hf 14b dump" },
|
{ 0, "hf 14b dump" },
|
||||||
{ 0, "hf 14b info" },
|
{ 0, "hf 14b info" },
|
||||||
{ 1, "hf 14b list" },
|
|
||||||
{ 0, "hf 14b ndefread" },
|
{ 0, "hf 14b ndefread" },
|
||||||
{ 0, "hf 14b raw" },
|
{ 0, "hf 14b raw" },
|
||||||
|
{ 0, "hf 14b rdbl" },
|
||||||
{ 0, "hf 14b reader" },
|
{ 0, "hf 14b reader" },
|
||||||
{ 0, "hf 14b sim" },
|
{ 0, "hf 14b sim" },
|
||||||
{ 0, "hf 14b sniff" },
|
{ 0, "hf 14b sniff" },
|
||||||
{ 0, "hf 14b rdbl" },
|
{ 0, "hf 14b wrbl" },
|
||||||
{ 0, "hf 14b sriwrite" },
|
|
||||||
{ 1, "hf 14b view" },
|
{ 1, "hf 14b view" },
|
||||||
|
{ 1, "hf 14b valid" },
|
||||||
{ 1, "hf 15 help" },
|
{ 1, "hf 15 help" },
|
||||||
{ 1, "hf 15 list" },
|
{ 1, "hf 15 list" },
|
||||||
{ 1, "hf 15 demod" },
|
{ 1, "hf 15 demod" },
|
||||||
|
|
|
@ -1333,7 +1333,7 @@ static int l_cwd(lua_State *L) {
|
||||||
while (GetCurrentDir(cwd, path_len) == NULL) {
|
while (GetCurrentDir(cwd, path_len) == NULL) {
|
||||||
if (errno == ERANGE) { // Need bigger buffer
|
if (errno == ERANGE) { // Need bigger buffer
|
||||||
path_len += 10; // if buffer was too small add 10 characters and try again
|
path_len += 10; // if buffer was too small add 10 characters and try again
|
||||||
char* cwdNew = realloc(cwd, path_len);
|
char *cwdNew = realloc(cwd, path_len);
|
||||||
if (cwdNew == NULL) {
|
if (cwdNew == NULL) {
|
||||||
free(cwd);
|
free(cwd);
|
||||||
return returnToLuaWithError(L, "Failed to allocate memory");
|
return returnToLuaWithError(L, "Failed to allocate memory");
|
||||||
|
|
|
@ -1112,26 +1112,26 @@
|
||||||
},
|
},
|
||||||
"hf 14a apdu": {
|
"hf 14a apdu": {
|
||||||
"command": "hf 14a apdu",
|
"command": "hf 14a apdu",
|
||||||
"description": "Sends an ISO 7816-4 APDU via ISO 14443-4 block transmission protocol (T=CL). works with all apdu types from ISO 7816-4:2013",
|
"description": "Sends an ISO 7816-4 APDU via ISO 14443-4 block transmission protocol (T=CL). Works with all APDU types from ISO 7816-4:2013 note: `-m` and `-d` goes hand in hand -m <CLA INS P1 P2> -d 325041592E5359532E4444463031 OR use `-d` with complete APDU data -d 00A404000E325041592E5359532E444446303100",
|
||||||
"notes": [
|
"notes": [
|
||||||
"hf 14a apdu -st 00A404000E325041592E5359532E444446303100",
|
"hf 14a apdu -st -d 00A404000E325041592E5359532E444446303100",
|
||||||
"hf 14a apdu -sd 00A404000E325041592E5359532E444446303100 -> decode apdu",
|
"hf 14a apdu -sd -d 00A404000E325041592E5359532E444446303100 -> decode apdu",
|
||||||
"hf 14a apdu -sm 00A40400 325041592E5359532E4444463031 -l 256 -> encode standard apdu",
|
"hf 14a apdu -sm 00A40400 -d 325041592E5359532E4444463031 -l 256 -> encode standard apdu",
|
||||||
"hf 14a apdu -sm 00A40400 325041592E5359532E4444463031 -el 65536 -> encode extended apdu"
|
"hf 14a apdu -sm 00A40400 -d 325041592E5359532E4444463031 -el 65536 -> encode extended apdu"
|
||||||
],
|
],
|
||||||
"offline": false,
|
"offline": false,
|
||||||
"options": [
|
"options": [
|
||||||
"-h, --help This help",
|
"-h, --help This help",
|
||||||
"-s, --select activate field and select card",
|
"-s, --select activate field and select card",
|
||||||
"-k, --keep keep signal field ON after receive",
|
"-k, --keep keep signal field ON after receive",
|
||||||
"-t, --tlv executes TLV decoder if it possible",
|
"-t, --tlv decode TLV",
|
||||||
"-d, --decapdu decode apdu request if it possible",
|
"-d, --decapdu decode APDU request",
|
||||||
"-m, --make <head (CLA INS P1 P2) hex> make apdu with head from this field and data from data field. Must be 4 bytes length: <CLA INS P1 P2>",
|
"-m, --make <hex> APDU header, 4 bytes <CLA INS P1 P2>",
|
||||||
"-e, --extended make extended length apdu if `m` parameter included",
|
"-e, --extended make extended length apdu if `m` parameter included",
|
||||||
"-l, --le <Le (int)> Le apdu parameter if `m` parameter included",
|
"-l, --le <dec> Le APDU parameter if `m` parameter included",
|
||||||
"<APDU (hex) | data (hex)> data if `m` parameter included"
|
"-d, --data <hex> full APDU package or data if `m` parameter included"
|
||||||
],
|
],
|
||||||
"usage": "hf 14a apdu [-hsktde] [-m <head (CLA INS P1 P2) hex>] [-l <Le (int)>] <APDU (hex) | data (hex)> [<APDU (hex) | data (hex)>]..."
|
"usage": "hf 14a apdu [-hsktde] [-m <hex>] [-l <dec>] -d <hex> [-d <hex>]..."
|
||||||
},
|
},
|
||||||
"hf 14a apdufind": {
|
"hf 14a apdufind": {
|
||||||
"command": "hf 14a apdufind",
|
"command": "hf 14a apdufind",
|
||||||
|
@ -1358,6 +1358,31 @@
|
||||||
],
|
],
|
||||||
"usage": "hf 14a sniff [-hcr]"
|
"usage": "hf 14a sniff [-hcr]"
|
||||||
},
|
},
|
||||||
|
"hf 14b apdu": {
|
||||||
|
"command": "hf 14b apdu",
|
||||||
|
"description": "Sends an ISO 7816-4 APDU via ISO 14443-4 block transmission protocol (T=CL). works with all apdu types from ISO 7816-4:2013",
|
||||||
|
"notes": [
|
||||||
|
"hf 14b apdu -s -d 94a40800043f000002",
|
||||||
|
"hf 14b apdu -s --decode -d 00A404000E325041592E5359532E444446303100 -> decode apdu",
|
||||||
|
"hf 14b apdu -sm 00A40400 -l 256 -d 325041592E5359532E4444463031 -> encode standard apdu",
|
||||||
|
"hf 14b apdu -sm 00A40400 -el 65536 -d 325041592E5359532E4444463031 -> encode extended apdu"
|
||||||
|
],
|
||||||
|
"offline": false,
|
||||||
|
"options": [
|
||||||
|
"-h, --help This help",
|
||||||
|
"-s, --select activate field and select card",
|
||||||
|
"-k, --keep leave the signal field ON after receive response",
|
||||||
|
"-t, --tlv executes TLV decoder if it possible",
|
||||||
|
"--decode decode apdu request if it possible",
|
||||||
|
"-m, --make <hex> make apdu with head from this field and data from data field.",
|
||||||
|
"must be 4 bytes: <CLA INS P1 P2>",
|
||||||
|
"-e, --extended make extended length apdu if `m` parameter included",
|
||||||
|
"-l, --le <int> Le apdu parameter if `m` parameter included",
|
||||||
|
"-d, --data <hex> <APDU | data> if `m` parameter included",
|
||||||
|
"--timeout <dec> timeout in ms"
|
||||||
|
],
|
||||||
|
"usage": "hf 14b apdu [-hskte] [--decode] [-m <hex>] [-l <int>] -d <hex> [--timeout <dec>]"
|
||||||
|
},
|
||||||
"hf 14b dump": {
|
"hf 14b dump": {
|
||||||
"command": "hf 14b dump",
|
"command": "hf 14b dump",
|
||||||
"description": "This command dumps the contents of a ISO-14443-B tag and save it to file Tries to autodetect cardtype, memory size defaults to SRI4K",
|
"description": "This command dumps the contents of a ISO-14443-B tag and save it to file Tries to autodetect cardtype, memory size defaults to SRI4K",
|
||||||
|
@ -1375,46 +1400,7 @@
|
||||||
},
|
},
|
||||||
"hf 14b help": {
|
"hf 14b help": {
|
||||||
"command": "hf 14b help",
|
"command": "hf 14b help",
|
||||||
"description": "help This help list List ISO-14443-B history view Display content from tag dump file --------------------------------------------------------------------------------------- hf 14b apdu available offline: no Sends an ISO 7816-4 APDU via ISO 14443-4 block transmission protocol (T=CL). works with all apdu types from ISO 7816-4:2013",
|
"description": "help This help list List ISO-14443-B history --------- ----------------------- general ----------------------- view Display content from tag dump file valid SRIX4 checksum test --------------------------------------------------------------------------------------- hf 14b list available offline: yes Alias of `trace list -t 14b -c` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
|
||||||
"notes": [
|
|
||||||
"hf 14b apdu -s -d 94a40800043f000002",
|
|
||||||
"hf 14b apdu -s --decode -d 00A404000E325041592E5359532E444446303100 -> decode apdu",
|
|
||||||
"hf 14b apdu -sm 00A40400 -l 256 -d 325041592E5359532E4444463031 -> encode standard apdu",
|
|
||||||
"hf 14b apdu -sm 00A40400 -el 65536 -d 325041592E5359532E4444463031 -> encode extended apdu"
|
|
||||||
],
|
|
||||||
"offline": true,
|
|
||||||
"options": [
|
|
||||||
"-h, --help This help",
|
|
||||||
"-s, --select activate field and select card",
|
|
||||||
"-k, --keep leave the signal field ON after receive response",
|
|
||||||
"-t, --tlv executes TLV decoder if it possible",
|
|
||||||
"--decode decode apdu request if it possible",
|
|
||||||
"-m, --make <hex> make apdu with head from this field and data from data field.",
|
|
||||||
"must be 4 bytes: <CLA INS P1 P2>",
|
|
||||||
"-e, --extended make extended length apdu if `m` parameter included",
|
|
||||||
"-l, --le <int> Le apdu parameter if `m` parameter included",
|
|
||||||
"-d, --data <hex> <APDU | data> if `m` parameter included",
|
|
||||||
"--timeout <dec> timeout in ms"
|
|
||||||
],
|
|
||||||
"usage": "hf 14b apdu [-hskte] [--decode] [-m <hex>] [-l <int>] -d <hex> [--timeout <dec>]"
|
|
||||||
},
|
|
||||||
"hf 14b info": {
|
|
||||||
"command": "hf 14b info",
|
|
||||||
"description": "Tag information for ISO/IEC 14443 type B based tags",
|
|
||||||
"notes": [
|
|
||||||
"hf 14b info"
|
|
||||||
],
|
|
||||||
"offline": false,
|
|
||||||
"options": [
|
|
||||||
"-h, --help This help",
|
|
||||||
"-s, --aidsearch checks if AIDs from aidlist.json is present on the card and prints information about found AIDs",
|
|
||||||
"-v, --verbose verbose output"
|
|
||||||
],
|
|
||||||
"usage": "hf 14b info [-hsv]"
|
|
||||||
},
|
|
||||||
"hf 14b list": {
|
|
||||||
"command": "hf 14b list",
|
|
||||||
"description": "Alias of `trace list -t 14b -c` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
|
|
||||||
"notes": [
|
"notes": [
|
||||||
"hf 14b list --frame -> show frame delay times",
|
"hf 14b list --frame -> show frame delay times",
|
||||||
"hf 14b list -1 -> use trace buffer"
|
"hf 14b list -1 -> use trace buffer"
|
||||||
|
@ -1433,6 +1419,20 @@
|
||||||
],
|
],
|
||||||
"usage": "hf 14b list [-h1crux] [--frame] [-f <fn>]"
|
"usage": "hf 14b list [-h1crux] [--frame] [-f <fn>]"
|
||||||
},
|
},
|
||||||
|
"hf 14b info": {
|
||||||
|
"command": "hf 14b info",
|
||||||
|
"description": "Tag information for ISO/IEC 14443 type B based tags",
|
||||||
|
"notes": [
|
||||||
|
"hf 14b info"
|
||||||
|
],
|
||||||
|
"offline": false,
|
||||||
|
"options": [
|
||||||
|
"-h, --help This help",
|
||||||
|
"-s, --aidsearch checks if AIDs from aidlist.json is present on the card and prints information about found AIDs",
|
||||||
|
"-v, --verbose verbose output"
|
||||||
|
],
|
||||||
|
"usage": "hf 14b info [-hsv]"
|
||||||
|
},
|
||||||
"hf 14b ndefread": {
|
"hf 14b ndefread": {
|
||||||
"command": "hf 14b ndefread",
|
"command": "hf 14b ndefread",
|
||||||
"description": "Print NFC Data Exchange Format (NDEF)",
|
"description": "Print NFC Data Exchange Format (NDEF)",
|
||||||
|
@ -1525,26 +1525,17 @@
|
||||||
],
|
],
|
||||||
"usage": "hf 14b sniff [-h]"
|
"usage": "hf 14b sniff [-h]"
|
||||||
},
|
},
|
||||||
"hf 14b sriwrite": {
|
"hf 14b valid": {
|
||||||
"command": "hf 14b sriwrite",
|
"command": "hf 14b valid",
|
||||||
"description": "Write data to a SRI512 or SRIX4K block If writing to a block out-of-range, use --force to override checks",
|
"description": "SRIX checksum test",
|
||||||
"notes": [
|
"notes": [
|
||||||
"hf 14b sriwrite --4k -b 100 -d 11223344",
|
"hf 14b valid"
|
||||||
"hf 14b sriwrite --4k --sb -d 11223344 -> special block write",
|
|
||||||
"hf 14b sriwrite --512 -b 15 -d 11223344",
|
|
||||||
"hf 14b sriwrite --512 --sb -d 11223344 -> special block write"
|
|
||||||
],
|
],
|
||||||
"offline": false,
|
"offline": true,
|
||||||
"options": [
|
"options": [
|
||||||
"-h, --help This help",
|
"-h, --help This help"
|
||||||
"-b, --block <dec> block number",
|
|
||||||
"-d, --data <hex> 4 hex bytes",
|
|
||||||
"--512 target SRI 512 tag",
|
|
||||||
"--4k target SRIX 4k tag",
|
|
||||||
"--sb special block write at end of memory (0xFF)",
|
|
||||||
"--force overrides block range checks"
|
|
||||||
],
|
],
|
||||||
"usage": "hf 14b sriwrite [-h] [-b <dec>] -d <hex> [--512] [--4k] [--sb] [--force]"
|
"usage": "hf 14b valid [-h]"
|
||||||
},
|
},
|
||||||
"hf 14b view": {
|
"hf 14b view": {
|
||||||
"command": "hf 14b view",
|
"command": "hf 14b view",
|
||||||
|
@ -1560,6 +1551,27 @@
|
||||||
],
|
],
|
||||||
"usage": "hf 14b view [-hv] -f <fn>"
|
"usage": "hf 14b view [-hv] -f <fn>"
|
||||||
},
|
},
|
||||||
|
"hf 14b wrbl": {
|
||||||
|
"command": "hf 14b wrbl",
|
||||||
|
"description": "Write data to a SRI512 or SRIX4K block If writing to a block out-of-range, use `--force` to override checks Special block at end denots OTP and lock bits among others",
|
||||||
|
"notes": [
|
||||||
|
"hf 14b wrbl --4k -b 100 -d 11223344",
|
||||||
|
"hf 14b wrbl --4k --sb -d 11223344 -> special block write",
|
||||||
|
"hf 14b wrbl --512 -b 15 -d 11223344",
|
||||||
|
"hf 14b wrbl --512 --sb -d 11223344 -> special block write"
|
||||||
|
],
|
||||||
|
"offline": false,
|
||||||
|
"options": [
|
||||||
|
"-h, --help This help",
|
||||||
|
"-b, --block <dec> block number",
|
||||||
|
"-d, --data <hex> 4 hex bytes",
|
||||||
|
"--512 target SRI 512 tag",
|
||||||
|
"--4k target SRIX 4k tag",
|
||||||
|
"--sb special block write at end of memory (0xFF)",
|
||||||
|
"--force overrides block range checks"
|
||||||
|
],
|
||||||
|
"usage": "hf 14b wrbl [-h] [-b <dec>] -d <hex> [--512] [--4k] [--sb] [--force]"
|
||||||
|
},
|
||||||
"hf 15 csetuid": {
|
"hf 15 csetuid": {
|
||||||
"command": "hf 15 csetuid",
|
"command": "hf 15 csetuid",
|
||||||
"description": "Set UID for magic Chinese card (only works with such cards)",
|
"description": "Set UID for magic Chinese card (only works with such cards)",
|
||||||
|
@ -12228,8 +12240,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"commands_extracted": 706,
|
"commands_extracted": 707,
|
||||||
"extracted_by": "PM3Help2JSON v1.00",
|
"extracted_by": "PM3Help2JSON v1.00",
|
||||||
"extracted_on": "2024-01-15T12:04:30"
|
"extracted_on": "2024-01-16T10:52:42"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -208,18 +208,19 @@ Check column "offline" for their availability.
|
||||||
|command |offline |description
|
|command |offline |description
|
||||||
|------- |------- |-----------
|
|------- |------- |-----------
|
||||||
|`hf 14b help `|Y |`This help`
|
|`hf 14b help `|Y |`This help`
|
||||||
|
|`hf 14b list `|Y |`List ISO-14443-B history`
|
||||||
|`hf 14b apdu `|N |`Send ISO 14443-4 APDU to tag`
|
|`hf 14b apdu `|N |`Send ISO 14443-4 APDU to tag`
|
||||||
|`hf 14b dump `|N |`Read all memory pages of an ISO-14443-B tag, save to file`
|
|`hf 14b dump `|N |`Read all memory pages of an ISO-14443-B tag, save to file`
|
||||||
|`hf 14b info `|N |`Tag information`
|
|`hf 14b info `|N |`Tag information`
|
||||||
|`hf 14b list `|Y |`List ISO-14443-B history`
|
|
||||||
|`hf 14b ndefread `|N |`Read NDEF file on tag`
|
|`hf 14b ndefread `|N |`Read NDEF file on tag`
|
||||||
|`hf 14b raw `|N |`Send raw hex data to tag`
|
|`hf 14b raw `|N |`Send raw hex data to tag`
|
||||||
|
|`hf 14b rdbl `|N |`Read SRI512/SRIX4 block`
|
||||||
|`hf 14b reader `|N |`Act as a ISO-14443-B reader to identify a tag`
|
|`hf 14b reader `|N |`Act as a ISO-14443-B reader to identify a tag`
|
||||||
|`hf 14b sim `|N |`Fake ISO ISO-14443-B tag`
|
|`hf 14b sim `|N |`Fake ISO ISO-14443-B tag`
|
||||||
|`hf 14b sniff `|N |`Eavesdrop ISO-14443-B`
|
|`hf 14b sniff `|N |`Eavesdrop ISO-14443-B`
|
||||||
|`hf 14b rdbl `|N |`Read SRI512/SRIX4x block`
|
|`hf 14b wrbl `|N |`Write data to a SRI512/SRIX4 tag`
|
||||||
|`hf 14b sriwrite `|N |`Write data to a SRI512 or SRIX4K tag`
|
|
||||||
|`hf 14b view `|Y |`Display content from tag dump file`
|
|`hf 14b view `|Y |`Display content from tag dump file`
|
||||||
|
|`hf 14b valid `|Y |`SRIX4 checksum test`
|
||||||
|
|
||||||
|
|
||||||
### hf 15
|
### hf 15
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue