mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
style
This commit is contained in:
parent
230f1c654b
commit
134f09be5e
5 changed files with 67 additions and 62 deletions
|
@ -145,9 +145,9 @@ static hf14a_config hf14aconfig = { 0, 0, 0, 0, 0 } ;
|
||||||
|
|
||||||
// Polling frames and configurations
|
// Polling frames and configurations
|
||||||
static iso14a_polling_parameters WUPA_POLLING_PARAMETERS = {
|
static iso14a_polling_parameters WUPA_POLLING_PARAMETERS = {
|
||||||
.frames={ {{ 0x52 }, 1, 7, 0} },
|
.frames = { {{ 0x52 }, 1, 7, 0} },
|
||||||
.frame_count=1,
|
.frame_count = 1,
|
||||||
.extra_timeout=0,
|
.extra_timeout = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -2519,7 +2519,7 @@ static void iso14a_set_ATS_times(const uint8_t *ats) {
|
||||||
|
|
||||||
|
|
||||||
static int GetATQA(uint8_t *resp, uint8_t *resp_par, iso14a_polling_parameters *polling_parameters) {
|
static int GetATQA(uint8_t *resp, uint8_t *resp_par, iso14a_polling_parameters *polling_parameters) {
|
||||||
#define WUPA_RETRY_TIMEOUT 10
|
#define WUPA_RETRY_TIMEOUT 10
|
||||||
|
|
||||||
uint32_t save_iso14a_timeout = iso14a_get_timeout();
|
uint32_t save_iso14a_timeout = iso14a_get_timeout();
|
||||||
iso14a_set_timeout(1236 / 128 + 1); // response to WUPA is expected at exactly 1236/fc. No need to wait longer.
|
iso14a_set_timeout(1236 / 128 + 1); // response to WUPA is expected at exactly 1236/fc. No need to wait longer.
|
||||||
|
|
|
@ -76,10 +76,10 @@ static const iso14a_polling_frame MAGWUPA4_FRAME = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static const iso14a_polling_frame ECP_FRAME = {
|
static const iso14a_polling_frame ECP_FRAME = {
|
||||||
.frame={ 0x6a, 0x02, 0xC8, 0x01, 0x00, 0x03, 0x00, 0x02, 0x79, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xD8},
|
.frame = { 0x6a, 0x02, 0xC8, 0x01, 0x00, 0x03, 0x00, 0x02, 0x79, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xD8},
|
||||||
.frame_length=15,
|
.frame_length = 15,
|
||||||
.last_byte_bits=8,
|
.last_byte_bits = 8,
|
||||||
.extra_delay=0
|
.extra_delay = 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -468,31 +468,31 @@ iso14a_polling_parameters iso14a_get_polling_parameters(bool use_ecp, bool use_m
|
||||||
|
|
||||||
if (use_ecp && use_magsafe) {
|
if (use_ecp && use_magsafe) {
|
||||||
iso14a_polling_parameters full_polling_parameters = {
|
iso14a_polling_parameters full_polling_parameters = {
|
||||||
.frames={ WUPA_FRAME, ECP_FRAME, MAGWUPA1_FRAME, MAGWUPA2_FRAME, MAGWUPA3_FRAME, MAGWUPA4_FRAME },
|
.frames = { WUPA_FRAME, ECP_FRAME, MAGWUPA1_FRAME, MAGWUPA2_FRAME, MAGWUPA3_FRAME, MAGWUPA4_FRAME },
|
||||||
.frame_count=6,
|
.frame_count = 6,
|
||||||
.extra_timeout=100
|
.extra_timeout = 100
|
||||||
};
|
};
|
||||||
return full_polling_parameters;
|
return full_polling_parameters;
|
||||||
} else if (use_ecp) {
|
} else if (use_ecp) {
|
||||||
iso14a_polling_parameters ecp_polling_parameters = {
|
iso14a_polling_parameters ecp_polling_parameters = {
|
||||||
.frames={ WUPA_FRAME, ECP_FRAME },
|
.frames = { WUPA_FRAME, ECP_FRAME },
|
||||||
.frame_count=2,
|
.frame_count = 2,
|
||||||
.extra_timeout=100
|
.extra_timeout = 100
|
||||||
};
|
};
|
||||||
return ecp_polling_parameters;
|
return ecp_polling_parameters;
|
||||||
} else if (use_magsafe) {
|
} else if (use_magsafe) {
|
||||||
iso14a_polling_parameters magsafe_polling_parameters = {
|
iso14a_polling_parameters magsafe_polling_parameters = {
|
||||||
.frames={ WUPA_FRAME, MAGWUPA1_FRAME, MAGWUPA2_FRAME, MAGWUPA3_FRAME, MAGWUPA4_FRAME },
|
.frames = { WUPA_FRAME, MAGWUPA1_FRAME, MAGWUPA2_FRAME, MAGWUPA3_FRAME, MAGWUPA4_FRAME },
|
||||||
.frame_count=5,
|
.frame_count = 5,
|
||||||
.extra_timeout=0
|
.extra_timeout = 0
|
||||||
};
|
};
|
||||||
return magsafe_polling_parameters;
|
return magsafe_polling_parameters;
|
||||||
}
|
}
|
||||||
|
|
||||||
iso14a_polling_parameters wupa_polling_parameters = {
|
iso14a_polling_parameters wupa_polling_parameters = {
|
||||||
.frames={ WUPA_FRAME },
|
.frames = { WUPA_FRAME },
|
||||||
.frame_count=1,
|
.frame_count = 1,
|
||||||
.extra_timeout=0,
|
.extra_timeout = 0,
|
||||||
};
|
};
|
||||||
return wupa_polling_parameters;
|
return wupa_polling_parameters;
|
||||||
}
|
}
|
||||||
|
@ -540,7 +540,7 @@ static int CmdHF14AReader(const char *Cmd) {
|
||||||
bool use_ecp = arg_get_lit(ctx, 5);
|
bool use_ecp = arg_get_lit(ctx, 5);
|
||||||
bool use_magsafe = arg_get_lit(ctx, 6);
|
bool use_magsafe = arg_get_lit(ctx, 6);
|
||||||
|
|
||||||
iso14a_polling_parameters * polling_parameters = NULL;
|
iso14a_polling_parameters *polling_parameters = NULL;
|
||||||
iso14a_polling_parameters parameters = iso14a_get_polling_parameters(use_ecp, use_magsafe);
|
iso14a_polling_parameters parameters = iso14a_get_polling_parameters(use_ecp, use_magsafe);
|
||||||
if (use_ecp || use_magsafe) {
|
if (use_ecp || use_magsafe) {
|
||||||
cm |= ISO14A_USE_CUSTOM_POLLING;
|
cm |= ISO14A_USE_CUSTOM_POLLING;
|
||||||
|
|
|
@ -42,17 +42,17 @@
|
||||||
#include "mbedtls/gcm.h"
|
#include "mbedtls/gcm.h"
|
||||||
|
|
||||||
static const iso14a_polling_frame WUPA_FRAME = {
|
static const iso14a_polling_frame WUPA_FRAME = {
|
||||||
.frame={ 0x52 },
|
.frame = { 0x52 },
|
||||||
.frame_length=1,
|
.frame_length = 1,
|
||||||
.last_byte_bits=7,
|
.last_byte_bits = 7,
|
||||||
.extra_delay=0,
|
.extra_delay = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const iso14a_polling_frame ECP_VAS_ONLY_FRAME = {
|
static const iso14a_polling_frame ECP_VAS_ONLY_FRAME = {
|
||||||
.frame={0x6a, 0x01, 0x00, 0x00, 0x02, 0xe4, 0xd2},
|
.frame = {0x6a, 0x01, 0x00, 0x00, 0x02, 0xe4, 0xd2},
|
||||||
.frame_length=7,
|
.frame_length = 7,
|
||||||
.last_byte_bits=8,
|
.last_byte_bits = 8,
|
||||||
.extra_delay=0,
|
.extra_delay = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
uint8_t aid[] = { 0x4f, 0x53, 0x45, 0x2e, 0x56, 0x41, 0x53, 0x2e, 0x30, 0x31 };
|
uint8_t aid[] = { 0x4f, 0x53, 0x45, 0x2e, 0x56, 0x41, 0x53, 0x2e, 0x30, 0x31 };
|
||||||
|
@ -350,9 +350,9 @@ static int VASReader(uint8_t *pidHash, const char *url, size_t urlLen, uint8_t *
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
|
|
||||||
iso14a_polling_parameters polling_parameters = {
|
iso14a_polling_parameters polling_parameters = {
|
||||||
.frames={ WUPA_FRAME, ECP_VAS_ONLY_FRAME },
|
.frames = { WUPA_FRAME, ECP_VAS_ONLY_FRAME },
|
||||||
.frame_count=2,
|
.frame_count = 2,
|
||||||
.extra_timeout=250
|
.extra_timeout = 250
|
||||||
};
|
};
|
||||||
|
|
||||||
if (SelectCard14443A_4_WithParameters(false, false, NULL, &polling_parameters) != PM3_SUCCESS) {
|
if (SelectCard14443A_4_WithParameters(false, false, NULL, &polling_parameters) != PM3_SUCCESS) {
|
||||||
|
|
|
@ -3534,13 +3534,17 @@
|
||||||
"command": "hf legic einfo",
|
"command": "hf legic einfo",
|
||||||
"description": "It decodes and displays emulator memory",
|
"description": "It decodes and displays emulator memory",
|
||||||
"notes": [
|
"notes": [
|
||||||
"hf legic einfo"
|
"hf legic einfo",
|
||||||
|
"hf legic eview --22"
|
||||||
],
|
],
|
||||||
"offline": false,
|
"offline": false,
|
||||||
"options": [
|
"options": [
|
||||||
"-h, --help This help"
|
"-h, --help This help",
|
||||||
|
"--22 LEGIC Prime MIM22",
|
||||||
|
"--256 LEGIC Prime MIM256 (def)",
|
||||||
|
"--1024 LEGIC Prime MIM1024"
|
||||||
],
|
],
|
||||||
"usage": "hf legic einfo [-h]"
|
"usage": "hf legic einfo [-h] [--22] [--256] [--1024]"
|
||||||
},
|
},
|
||||||
"hf legic eload": {
|
"hf legic eload": {
|
||||||
"command": "hf legic eload",
|
"command": "hf legic eload",
|
||||||
|
@ -7631,9 +7635,10 @@
|
||||||
],
|
],
|
||||||
"offline": true,
|
"offline": true,
|
||||||
"options": [
|
"options": [
|
||||||
"-h, --help This help"
|
"-h, --help This help",
|
||||||
|
"-v, --verbose verbose output"
|
||||||
],
|
],
|
||||||
"usage": "lf cotag demod [-h]"
|
"usage": "lf cotag demod [-hv]"
|
||||||
},
|
},
|
||||||
"lf cotag reader": {
|
"lf cotag reader": {
|
||||||
"command": "lf cotag reader",
|
"command": "lf cotag reader",
|
||||||
|
@ -11689,6 +11694,6 @@
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"commands_extracted": 679,
|
"commands_extracted": 679,
|
||||||
"extracted_by": "PM3Help2JSON v1.00",
|
"extracted_by": "PM3Help2JSON v1.00",
|
||||||
"extracted_on": "2023-07-16T13:30:30"
|
"extracted_on": "2023-07-17T15:46:12"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue