mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 22:03:42 -07:00
reworked the hf st info
output. A bit more clear now
This commit is contained in:
parent
cfaf8853d7
commit
0d17f453f7
2 changed files with 42 additions and 33 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...
|
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]
|
## [unreleased][unreleased]
|
||||||
|
- Changed `hf st info` - reworked the output (@iceman1001)
|
||||||
- Rename `smart relay` to `smart pcsc` and add support for contact interface (@gm3197)
|
- Rename `smart relay` to `smart pcsc` and add support for contact interface (@gm3197)
|
||||||
- Updated ATR list (@iceman1001)
|
- Updated ATR list (@iceman1001)
|
||||||
- Changed `hf mfu keygen -b` - now takes a block number (@iceman1001)
|
- Changed `hf mfu keygen -b` - now takes a block number (@iceman1001)
|
||||||
|
|
|
@ -44,20 +44,20 @@ static void print_st25ta_system_info(uint8_t *d, uint8_t n) {
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintAndLogEx(NORMAL, "");
|
PrintAndLogEx(NORMAL, "");
|
||||||
PrintAndLogEx(SUCCESS, "------------ " _CYAN_("ST System file") " ------------");
|
PrintAndLogEx(SUCCESS, "------------ " _CYAN_("ST System file") " -----------------------------");
|
||||||
|
|
||||||
uint16_t len = (d[0] << 8 | d[1]);
|
PrintAndLogEx(SUCCESS, "Manufacture..... " _YELLOW_("%s"), getTagInfo(d[8]));
|
||||||
PrintAndLogEx(SUCCESS, " len %u bytes ( " _GREEN_("0x%04X") " )", len, len);
|
PrintAndLogEx(SUCCESS, "Product Code.... " _YELLOW_("%s"), get_st_chip_model(d[9]));
|
||||||
|
PrintAndLogEx(SUCCESS, "Device Serial... " _YELLOW_("%s"), sprint_hex_inrow(d + 10, 5));
|
||||||
|
|
||||||
|
if (d[2] != 0x80) {
|
||||||
|
|
||||||
|
PrintAndLogEx(SUCCESS, "GPO Config... 0x%02X", d[2]);
|
||||||
|
PrintAndLogEx(SUCCESS, " lock bit.... %s", ((d[2] & 0x80) == 0x80) ? _RED_("locked") : _GREEN_("unlocked"));
|
||||||
|
|
||||||
if (d[2] == 0x80) {
|
|
||||||
PrintAndLogEx(SUCCESS, " ST reserved ( 0x%02X )", d[2]);
|
|
||||||
} else {
|
|
||||||
PrintAndLogEx(SUCCESS, " GPO Config ( 0x%02X )", d[2]);
|
|
||||||
PrintAndLogEx(SUCCESS, " config lock bit ( %s )", ((d[2] & 0x80) == 0x80) ? _RED_("locked") : _GREEN_("unlocked"));
|
|
||||||
uint8_t conf = (d[2] & 0x70) >> 4;
|
uint8_t conf = (d[2] & 0x70) >> 4;
|
||||||
switch (conf) {
|
switch (conf) {
|
||||||
case 0:
|
case 0:
|
||||||
PrintAndLogEx(SUCCESS, "");
|
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
PrintAndLogEx(SUCCESS, " Session opened");
|
PrintAndLogEx(SUCCESS, " Session opened");
|
||||||
|
@ -83,28 +83,36 @@ static void print_st25ta_system_info(uint8_t *d, uint8_t n) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintAndLogEx(SUCCESS, " Event counter config ( 0x%02X )", d[3]);
|
PrintAndLogEx(NORMAL, "");
|
||||||
PrintAndLogEx(SUCCESS, " config lock bit ( %s )", ((d[3] & 0x80) == 0x80) ? _RED_("locked") : _GREEN_("unlocked"));
|
PrintAndLogEx(SUCCESS, "Event counter config.... 0x%02X", d[3]);
|
||||||
PrintAndLogEx(SUCCESS, " counter ( %s )", ((d[3] & 0x02) == 0x02) ? _RED_("enabled") : _GREEN_("disable"));
|
PrintAndLogEx(SUCCESS, " config lock bit........ %s", ((d[3] & 0x80) == 0x80) ? _RED_("locked") : _GREEN_("unlocked"));
|
||||||
PrintAndLogEx(SUCCESS, " counter increment on ( %s )", ((d[3] & 0x01) == 0x01) ? _YELLOW_("write") : _YELLOW_("read"));
|
PrintAndLogEx(SUCCESS, " counter................ %s", ((d[3] & 0x02) == 0x02) ? _RED_("enabled") : _GREEN_("disable"));
|
||||||
|
PrintAndLogEx(SUCCESS, " counter increment on... %s", ((d[3] & 0x01) == 0x01) ? _YELLOW_("write") : _YELLOW_("read"));
|
||||||
|
PrintAndLogEx(NORMAL, "");
|
||||||
|
|
||||||
|
uint16_t len = (d[0] << 8 | d[1]);
|
||||||
|
|
||||||
|
PrintAndLogEx(SUCCESS, "----------------- " _CYAN_("raw") " -----------------------------------");
|
||||||
|
PrintAndLogEx(SUCCESS, " %s", sprint_hex_inrow(d, n));
|
||||||
|
PrintAndLogEx(SUCCESS, " %02X%02X................................ - Len ( %u bytes )", d[0], d[1], len);
|
||||||
|
|
||||||
|
if (d[2] == 0x80) {
|
||||||
|
PrintAndLogEx(SUCCESS, " ....%02X.............................. - ST reserved", d[2]);
|
||||||
|
} else {
|
||||||
|
PrintAndLogEx(SUCCESS, " ....%02X.............................. - GPO config" , d[2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
PrintAndLogEx(SUCCESS, " ......%02X............................ - Event counter config", d[3]);
|
||||||
|
|
||||||
uint32_t counter = (d[4] << 16 | d[5] << 8 | d[6]);
|
uint32_t counter = (d[4] << 16 | d[5] << 8 | d[6]);
|
||||||
PrintAndLogEx(SUCCESS, " 20bit counter ( 0x%05X )", counter & 0xFFFFF);
|
PrintAndLogEx(SUCCESS, " ........%02X%02X%02X...................... - 20 bit counter ( %u )", d[4],d[5],d[6], (counter & 0xFFFFF));
|
||||||
|
PrintAndLogEx(SUCCESS, " ..............%02X.................... - Product version", d[7]);
|
||||||
PrintAndLogEx(SUCCESS, " Product version ( 0x%02X )", d[7]);
|
PrintAndLogEx(SUCCESS, " ................%s...... - UID", 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, " ..............................%02X%02X.. - Mem size - 1 ( %u bytes )", d[0xf], d[0x10], mem);
|
||||||
|
|
||||||
PrintAndLogEx(SUCCESS, " IC Reference code %u ( 0x%02X )", d[0x12], d[0x12]);
|
PrintAndLogEx(SUCCESS, " ..................................%02X - IC ref code", d[0x11]);
|
||||||
|
|
||||||
PrintAndLogEx(SUCCESS, "----------------- " _CYAN_("raw") " -----------------");
|
|
||||||
PrintAndLogEx(SUCCESS, "%s", sprint_hex_inrow(d, n));
|
|
||||||
PrintAndLogEx(NORMAL, "");
|
PrintAndLogEx(NORMAL, "");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue