This commit is contained in:
iceman1001 2024-10-12 13:56:17 +02:00
commit 8293b81217
9 changed files with 57 additions and 38 deletions

View file

@ -468,7 +468,7 @@ static int print_atqb_resp(uint8_t *data, uint8_t cid) {
PrintAndLogEx(NORMAL, "");
PrintAndLogEx(INFO, "--- " _CYAN_("Fingerprint"));
if (memcmp(data, "\x54\x43\x4F\x53",4) == 0) {
if (memcmp(data, "\x54\x43\x4F\x53", 4) == 0) {
int outlen = 0;
uint8_t out[PM3_CMD_DATA_SIZE] = {0};
@ -2935,8 +2935,8 @@ static int CmdHF14BSetUID(const char *Cmd) {
return switch_off_field_14b();
}
iso14b_card_select_t *card = (iso14b_card_select_t*)select;
if (memcmp(card->atqb, "\x54\x43\x4F\x53", 4) ) {
iso14b_card_select_t *card = (iso14b_card_select_t *)select;
if (memcmp(card->atqb, "\x54\x43\x4F\x53", 4)) {
PrintAndLogEx(FAILED, "None supported tag");
PrintAndLogEx(NORMAL, "");
return switch_off_field_14b();

View file

@ -529,7 +529,7 @@ static int CmdEM410xBrute(const char *Cmd) {
// load keys
uint8_t *uidblock = NULL;
uint32_t uidcount = 0;
int res = loadFileDICTIONARY_safe_ex(filename, suffix, (void**)&uidblock, 5, &uidcount, false);
int res = loadFileDICTIONARY_safe_ex(filename, suffix, (void **)&uidblock, 5, &uidcount, false);
if (res != PM3_SUCCESS) {
free(uidblock);
return res;

View file

@ -458,7 +458,7 @@ void hitags_config_print(hitags_config_t config) {
PrintAndLogEx(INFO, " Authenticaion.... %s", config.auth ? _YELLOW_("Yes") : "No");
PrintAndLogEx(INFO, " TTF coding....... %s",
config.RES3 ? "FSK 0=RF/10 1=RF/8" : (const char *[]){"Manchester", "Biphase"}[config.TTFC]);
config.RES3 ? "FSK 0=RF/10 1=RF/8" : (const char *[]) {"Manchester", "Biphase"}[config.TTFC]);
PrintAndLogEx(INFO, " TTF data rate.... %s",
(const char *[]) {
@ -467,7 +467,7 @@ void hitags_config_print(hitags_config_t config) {
}[config.TTFDR]);
PrintAndLogEx(INFO, " TTF mode......... %s",
(const char *[]){
(const char *[]) {
"TTF Mode disabled (= RTF Mode)",
"Page 4, Page 5",
"Page 4, Page 5, Page 6, Page 7",

View file

@ -717,7 +717,7 @@ int saveFileJSONex(const char *preferredName, JSONFileType ftype, uint8_t *data,
if (datalen != sizeof(iso14a_fm11rf08s_nonces_with_data_t)) {
return PM3_EINVARG;
}
iso14a_fm11rf08s_nonces_with_data_t * p = (iso14a_fm11rf08s_nonces_with_data_t *)data;
iso14a_fm11rf08s_nonces_with_data_t *p = (iso14a_fm11rf08s_nonces_with_data_t *)data;
if (ftype == jsfFM11RF08SNoncesWithData) {
JsonSaveStr(root, "FileType", "fm11rf08s_nonces_with_data");
} else {
@ -2317,7 +2317,7 @@ int loadFileDICTIONARY_safe(const char *preferredName, void **pdata, uint8_t key
return loadFileDICTIONARY_safe_ex(preferredName, ".dic", pdata, keylen, keycnt, true);
}
int loadFileDICTIONARY_safe_ex(const char *preferredName, const char* suffix, void **pdata, uint8_t keylen, uint32_t *keycnt, bool verbose) {
int loadFileDICTIONARY_safe_ex(const char *preferredName, const char *suffix, void **pdata, uint8_t keylen, uint32_t *keycnt, bool verbose) {
int retval = PM3_SUCCESS;

View file

@ -279,7 +279,7 @@ int loadFileDICTIONARYEx(const char *preferredName, void *data, size_t maxdatale
*/
int loadFileDICTIONARY_safe(const char *preferredName, void **pdata, uint8_t keylen, uint32_t *keycnt);
int loadFileDICTIONARY_safe_ex(const char *preferredName, const char* suffix, void **pdata, uint8_t keylen, uint32_t *keycnt, bool verbose);
int loadFileDICTIONARY_safe_ex(const char *preferredName, const char *suffix, void **pdata, uint8_t keylen, uint32_t *keycnt, bool verbose);
int loadFileBinaryKey(const char *preferredName, const char *suffix, void **keya, void **keyb, size_t *alen, size_t *blen);

View file

@ -176,6 +176,7 @@ const static vocabulary_t vocabulary[] = {
{ 1, "hf 14b valid" },
{ 0, "hf 14b calypso" },
{ 0, "hf 14b mobib" },
{ 0, "hf 14b setuid" },
{ 1, "hf 15 help" },
{ 1, "hf 15 list" },
{ 1, "hf 15 demod" },

View file

@ -1613,6 +1613,19 @@
],
"usage": "hf 14b restore [-h] [-f <fn>] [--512] [--4k]"
},
"hf 14b setuid": {
"command": "hf 14b setuid",
"description": "Set UID for magic card (only works with such cards)",
"notes": [
"hf 14b setuid -u 11223344"
],
"offline": false,
"options": [
"-h, --help This help",
"-u, --uid <hex> UID, 4 hex bytes"
],
"usage": "hf 14b setuid [-h] -u <hex>"
},
"hf 14b sim": {
"command": "hf 14b sim",
"description": "Simulate a ISO/IEC 14443 type B tag with 4 byte UID / PUPI",
@ -3221,12 +3234,14 @@
"options": [
"-h, --help This help",
"--ci <dec> use config slot at index",
"--ki <dec> Key index to select key from memory 'hf iclass managekeys'",
"--ki <dec> Card Key - index to select key from memory 'hf iclass managekeys'",
"--krki <dec> Elite Keyroll Key - index to select key from memory 'hf iclass managekeys'",
"--elite Use elite key for the the Card Key ki",
"-g generate card dump file",
"-l load available cards",
"-p print available cards"
],
"usage": "hf iclass configcard [-hglp] [--ci <dec>] [--ki <dec>]"
"usage": "hf iclass configcard [-hglp] [--ci <dec>] [--ki <dec>] [--krki <dec>] [--elite]"
},
"hf iclass creditepurse": {
"command": "hf iclass creditepurse",
@ -5111,9 +5126,10 @@
"",
"FM11RF08S specific options: Incompatible with above options, except -k; output in JSON",
"--collect_fm11rf08s collect all nT/{nT}/par_err.",
"--collect_fm11rf08s_with_data collect all nT/{nT}/par_err and data blocks."
"--collect_fm11rf08s_with_data collect all nT/{nT}/par_err and data blocks.",
"-f, --file <fn> Specify a filename for collected data"
],
"usage": "hf mf isen [-hab] [--blk <dec>] [-c <dec>] [-k <hex>] [--blk2 <dec>] [--a2] [--b2] [--c2 <dec>] [--key2 <hex>] [-n <dec>] [--reset] [--hardreset] [--addread] [--addauth] [--incblk2] [--corruptnrar] [--corruptnrarparity] FM11RF08S specific options: [--collect_fm11rf08s] [--collect_fm11rf08s_with_data]"
"usage": "hf mf isen [-hab] [--blk <dec>] [-c <dec>] [-k <hex>] [--blk2 <dec>] [--a2] [--b2] [--c2 <dec>] [--key2 <hex>] [-n <dec>] [--reset] [--hardreset] [--addread] [--addauth] [--incblk2] [--corruptnrar] [--corruptnrarparity] FM11RF08S specific options: [--collect_fm11rf08s] [--collect_fm11rf08s_with_data] [-f <fn>]"
},
"hf mf mad": {
"command": "hf mf mad",
@ -9793,9 +9809,10 @@
"--nrar <hex> nonce / answer writer, 8 hex bytes",
"--crypto crypto mode",
"-k, --key <hex> pwd or key, 4 or 6 hex bytes",
"-p, --page <dec> page address to read from"
"-p, --page <dec> page address to read from",
"-c, --count <dec> how many pages to read. '0' reads all pages up to the end page (default: 1)"
],
"usage": "lf hitag hts rdbl [-h8] [--nrar <hex>] [--crypto] [-k <hex>] -p <dec>"
"usage": "lf hitag hts rdbl [-h8] [--nrar <hex>] [--crypto] [-k <hex>] [-p <dec>] [-c <dec>]"
},
"lf hitag hts reader": {
"command": "lf hitag hts reader",
@ -12954,8 +12971,8 @@
}
},
"metadata": {
"commands_extracted": 747,
"commands_extracted": 748,
"extracted_by": "PM3Help2JSON v1.00",
"extracted_on": "2024-10-04T07:43:15"
"extracted_on": "2024-10-12T11:55:26"
}
}

View file

@ -227,6 +227,7 @@ Check column "offline" for their availability.
|`hf 14b valid `|Y |`SRIX4 checksum test`
|`hf 14b calypso `|N |`Read contents of a Calypso card`
|`hf 14b mobib `|N |`Read contents of a Mobib card`
|`hf 14b setuid `|N |`Set UID for magic card`
### hf 15
@ -1078,9 +1079,9 @@ Check column "offline" for their availability.
|`lf hitag hts help `|Y |`This help`
|`lf hitag hts list `|Y |`List Hitag S trace history`
|`lf hitag hts reader `|N |`Act like a Hitag S reader`
|`lf hitag hts rdbl `|N |`Read Hitag S memory`
|`lf hitag hts rdbl `|N |`Read Hitag S page`
|`lf hitag hts wrbl `|N |`Write Hitag S page`
|`lf hitag hts sim `|N |`Simulate Hitag transponder`
|`lf hitag hts sim `|N |`Simulate Hitag S transponder`
### lf idteck