mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
ATS printing can be an issue since some magic cards doesnt treat ATS properly. This will lessen the garbage output
This commit is contained in:
parent
cd0ce47d89
commit
65cf65dc96
3 changed files with 20 additions and 6 deletions
|
@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
|
|||
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
|
||||
|
||||
## [unreleased][unreleased]
|
||||
- Changed `hf mf info` - Better handling when printing ATS (@iceman1001)
|
||||
- Changed to also try the MFC_B key when extracting memory (@iceman1001)
|
||||
- Fix parallel `make -j check` Thanks @elboulangero (@iceman1001)
|
||||
- Added support for 8268/8310 (@douniwan5788)
|
||||
|
|
|
@ -126,7 +126,7 @@ static bool get_14b_UID(iso14b_card_select_t *card) {
|
|||
} // retry
|
||||
|
||||
if (retry <= 0) {
|
||||
PrintAndLogEx(FAILED, "command execution timeout");
|
||||
PrintAndLogEx(FAILED, "command execution time out");
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -145,7 +145,7 @@ static int infoHFCryptoRF(bool verbose) {
|
|||
PacketResponseNG resp;
|
||||
if (WaitForResponseTimeout(CMD_HF_ISO14443B_COMMAND, &resp, TIMEOUT) == false) {
|
||||
if (verbose) {
|
||||
PrintAndLogEx(WARNING, "command execution timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
}
|
||||
switch_off_field_cryptorf();
|
||||
return false;
|
||||
|
|
|
@ -7555,9 +7555,9 @@ static int CmdHF14AMfWipe(const char *Cmd) {
|
|||
char *fptr;
|
||||
if (keyfnlen == 0) {
|
||||
fptr = GenerateFilename("hf-mf-", "-key.bin");
|
||||
if (fptr == NULL)
|
||||
if (fptr == NULL) {
|
||||
return PM3_ESOFT;
|
||||
|
||||
}
|
||||
strncpy(keyFilename, fptr, sizeof(keyFilename) - 1);
|
||||
free(fptr);
|
||||
}
|
||||
|
@ -7585,7 +7585,7 @@ static int CmdHF14AMfWipe(const char *Cmd) {
|
|||
}
|
||||
case (MIFARE_1K_EV1_MAX_KEY_SIZE): {
|
||||
PrintAndLogEx(INFO, "Loaded keys matching MIFARE Classic 1K Ev1");
|
||||
memcpy(keyA, keys, MIFARE_1K_EV1_MAXSECTOR * MIFARE_KEY_SIZE);
|
||||
memcpy(keyA, keys, (MIFARE_1K_EV1_MAXSECTOR * MIFARE_KEY_SIZE));
|
||||
memcpy(keyB, keys + (MIFARE_1K_EV1_MAXSECTOR * MIFARE_KEY_SIZE), (MIFARE_1K_EV1_MAXSECTOR * MIFARE_KEY_SIZE));
|
||||
num_sectors = NumOfSectors('1');
|
||||
memcpy(mf, "\x11\x22\x33\x44\x44\x08\x04\x00\x62\x63\x64\x65\x66\x67\x68\x69", MFBLOCK_SIZE);
|
||||
|
@ -7863,14 +7863,27 @@ static int parse_gtu_cfg(uint8_t *d, size_t n) {
|
|||
break;
|
||||
}
|
||||
|
||||
PrintAndLogEx(INFO, "..............%02X unknown", d[7]);
|
||||
uint8_t atslen = d[7];
|
||||
if (atslen == 0) {
|
||||
PrintAndLogEx(INFO, "..............%02X ATS length %u bytes ( %s )", _YELLOW_("zero"), atslen);
|
||||
} else if (atslen <= 16) {
|
||||
PrintAndLogEx(INFO, "..............%02X ATS length %u bytes ( %s )", _GREEN_("ok"), atslen);
|
||||
} else {
|
||||
PrintAndLogEx(INFO, "..............%02X ATS length %u bytes ( %s )", _RED_("fail"), atslen);
|
||||
atslen = 0;
|
||||
}
|
||||
|
||||
PrintAndLogEx(INFO, "");
|
||||
|
||||
// ATS seems to have 16 bytes reserved
|
||||
PrintAndLogEx(INFO, _CYAN_("Config 2 - ATS"));
|
||||
PrintAndLogEx(INFO, "%s", sprint_hex_inrow(d + 8, 16));
|
||||
if (atslen <= 16) {
|
||||
PrintAndLogEx(INFO, "%s.............. ATS ( %d bytes )", sprint_hex_inrow(&d[8], d[7]), d[7]);
|
||||
PrintAndLogEx(INFO, "..................%s Reserved for ATS", sprint_hex_inrow(d + 8 + d[7], 16 - d[7]));
|
||||
} else {
|
||||
PrintAndLogEx(INFO, "%s.............. %s Reserved for ATS", sprint_hex_inrow(&d[8], 16), 16);
|
||||
}
|
||||
|
||||
PrintAndLogEx(INFO, "");
|
||||
PrintAndLogEx(INFO, _CYAN_("Config 3 - Limits"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue