mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-01-09 19:57:54 -05:00
hf 14b info: add ATR fingerprinting
This commit is contained in:
@@ -3,7 +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]
|
||||
- Added ATR fingerprinting to `hf 14a info` (@doegox)
|
||||
- Added ATR fingerprinting to `hf 14a/14b info` (@doegox)
|
||||
|
||||
## [Phrack.4.20728][2025-09-11]
|
||||
- Change `lf t55xx restore` - now skips writing block0 if its all zeros (@iceman1001)
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
#include "aidsearch.h"
|
||||
#include "fileutils.h" // saveFile
|
||||
#include "iclass_cmd.h" // picopass defines
|
||||
#include "cmdhf.h" // handle HF plot
|
||||
#include "cmdhf.h" // handle HF plot
|
||||
#include "atrs.h" // atqbToEmulatedAtr
|
||||
|
||||
#define MAX_14B_TIMEOUT_MS (4949U)
|
||||
|
||||
@@ -467,8 +468,8 @@ static int print_atqb_resp(uint8_t *data, uint8_t cid) {
|
||||
PrintAndLogEx(SUCCESS, " CID : %u", cid & 0x0f);
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
|
||||
PrintAndLogEx(INFO, "--- " _CYAN_("Fingerprint"));
|
||||
if (memcmp(data, "\x54\x43\x4F\x53", 4) == 0) {
|
||||
PrintAndLogEx(INFO, "--- " _CYAN_("Fingerprint") " -------------------------------");
|
||||
|
||||
int outlen = 0;
|
||||
uint8_t out[PM3_CMD_DATA_SIZE] = {0};
|
||||
@@ -483,7 +484,17 @@ static int print_atqb_resp(uint8_t *data, uint8_t cid) {
|
||||
}
|
||||
|
||||
} else {
|
||||
PrintAndLogEx(INFO, "n/a");
|
||||
PrintAndLogEx(INFO, "--- " _CYAN_("ATR fingerprint") " ---------------------------");
|
||||
uint8_t atr[256] = {0};
|
||||
int atrLen = 0;
|
||||
atqbToEmulatedAtr(data, cid, atr, &atrLen);
|
||||
char *copy = str_dup(getAtrInfo(sprint_hex_inrow(atr, atrLen)));
|
||||
char *token = strtok(copy, "\n");
|
||||
while (token != NULL) {
|
||||
PrintAndLogEx(INFO, " %s", token);
|
||||
token = strtok(NULL, "\n");
|
||||
}
|
||||
free(copy);
|
||||
}
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
return PM3_SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user