mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
hf st info - more details GPO, Event
This commit is contained in:
parent
b16d895438
commit
8736f60fdc
1 changed files with 30 additions and 11 deletions
|
@ -41,13 +41,13 @@ static int usage_hf_st_sim(void) {
|
||||||
PrintAndLogEx(NORMAL, _YELLOW_(" hf 14a sim u 02E2007D0FCA4C"));
|
PrintAndLogEx(NORMAL, _YELLOW_(" hf 14a sim u 02E2007D0FCA4C"));
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
// get ST chip model (from UID) // from ST Microelectronics
|
// get ST Microelectronics chip model (from UID)
|
||||||
static char *get_st_chip_model(uint8_t data) {
|
static char *get_st_chip_model(uint8_t pc) {
|
||||||
static char model[20];
|
static char model[40];
|
||||||
char *s = model;
|
char *s = model;
|
||||||
memset(model, 0, sizeof(model));
|
memset(model, 0, sizeof(model));
|
||||||
switch (data) {
|
switch (pc) {
|
||||||
case 0x0:
|
case 0x0:
|
||||||
sprintf(s, "SRIX4K (Special)");
|
sprintf(s, "SRIX4K (Special)");
|
||||||
break;
|
break;
|
||||||
|
@ -69,13 +69,28 @@ static char *get_st_chip_model(uint8_t data) {
|
||||||
case 0xC:
|
case 0xC:
|
||||||
sprintf(s, "SRT512");
|
sprintf(s, "SRT512");
|
||||||
break;
|
break;
|
||||||
|
case 0xE2:
|
||||||
|
sprintf(s, "ST25??? IKEA Rothult");
|
||||||
|
break;
|
||||||
|
case 0xE3:
|
||||||
|
sprintf(s, "ST25TA02KB");
|
||||||
|
break;
|
||||||
|
case 0xE4:
|
||||||
|
sprintf(s, "ST25TA512B");
|
||||||
|
break;
|
||||||
|
case 0xA3:
|
||||||
|
sprintf(s, "ST25TA02KB-P");
|
||||||
|
break;
|
||||||
|
case 0xF3:
|
||||||
|
sprintf(s, "ST25TA02KB-D");
|
||||||
|
break;
|
||||||
default :
|
default :
|
||||||
sprintf(s, "Unknown");
|
sprintf(s, "Unknown");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
// print UID info from SRx chips (ST Microelectronics)
|
// print UID info from SRx chips (ST Microelectronics)
|
||||||
static void print_st_general_info(uint8_t *data, uint8_t len) {
|
static void print_st_general_info(uint8_t *data, uint8_t len) {
|
||||||
//uid = first 8 bytes in data
|
//uid = first 8 bytes in data
|
||||||
|
@ -103,8 +118,8 @@ static void print_st_cc_info(uint8_t *d, uint8_t n) {
|
||||||
PrintAndLogEx(SUCCESS, " max bytes write %u bytes ( 0x%04X )", maxw, maxw);
|
PrintAndLogEx(SUCCESS, " max bytes write %u bytes ( 0x%04X )", maxw, maxw);
|
||||||
PrintAndLogEx(NORMAL, "");
|
PrintAndLogEx(NORMAL, "");
|
||||||
PrintAndLogEx(SUCCESS, " NDEF file control TLV {");
|
PrintAndLogEx(SUCCESS, " NDEF file control TLV {");
|
||||||
PrintAndLogEx(SUCCESS, " t ( %02X )", d[7]);
|
PrintAndLogEx(SUCCESS, " (t) type of file ( %02X )", d[7]);
|
||||||
PrintAndLogEx(SUCCESS, " v ( %02X )", d[8]);
|
PrintAndLogEx(SUCCESS, " (v) ( %02X )", d[8]);
|
||||||
PrintAndLogEx(SUCCESS, " file id ( %02X%02X )", d[9], d[10]);
|
PrintAndLogEx(SUCCESS, " file id ( %02X%02X )", d[9], d[10]);
|
||||||
|
|
||||||
uint16_t maxndef = (d[11] << 8 | d[12]);
|
uint16_t maxndef = (d[11] << 8 | d[12]);
|
||||||
|
@ -174,6 +189,9 @@ static void print_st_system_info(uint8_t *d, uint8_t n) {
|
||||||
PrintAndLogEx(SUCCESS, " Product version ( 0x%02X )", d[7]);
|
PrintAndLogEx(SUCCESS, " Product version ( 0x%02X )", d[7]);
|
||||||
|
|
||||||
PrintAndLogEx(SUCCESS, " UID " _GREEN_("%s"), sprint_hex_inrow(d + 8, 7));
|
PrintAndLogEx(SUCCESS, " UID " _GREEN_("%s"), sprint_hex_inrow(d + 8, 7));
|
||||||
|
PrintAndLogEx(SUCCESS, " MFG 0x%02X, " _YELLOW_("%s"), d[8], getTagInfo(d[8]));
|
||||||
|
PrintAndLogEx(SUCCESS, " Product Code 0x%02X, " _YELLOW_("%s"), d[9], get_st_chip_model(d[9]));
|
||||||
|
PrintAndLogEx(SUCCESS, " Device# " _YELLOW_("%s"), sprint_hex_inrow(d + 10, 5));
|
||||||
|
|
||||||
uint16_t mem = (d[0xF] << 8 | d[0x10]);
|
uint16_t mem = (d[0xF] << 8 | d[0x10]);
|
||||||
PrintAndLogEx(SUCCESS, " Memory Size - 1 %u bytes (" _GREEN_("0x%04X") ")", mem, mem);
|
PrintAndLogEx(SUCCESS, " Memory Size - 1 %u bytes (" _GREEN_("0x%04X") ")", mem, mem);
|
||||||
|
@ -206,6 +224,7 @@ int infoHF_ST(void) {
|
||||||
uint8_t response[PM3_CMD_DATA_SIZE];
|
uint8_t response[PM3_CMD_DATA_SIZE];
|
||||||
int resplen = 0;
|
int resplen = 0;
|
||||||
|
|
||||||
|
// --------------- Select NDEF Tag application ----------------
|
||||||
uint8_t aSELECT_AID[80];
|
uint8_t aSELECT_AID[80];
|
||||||
int aSELECT_AID_n = 0;
|
int aSELECT_AID_n = 0;
|
||||||
param_gethex_to_eol("00a4040007d276000085010100", 0, aSELECT_AID, sizeof(aSELECT_AID), &aSELECT_AID_n);
|
param_gethex_to_eol("00a4040007d276000085010100", 0, aSELECT_AID, sizeof(aSELECT_AID), &aSELECT_AID_n);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue