make style

This commit is contained in:
Philippe Teuwen 2021-10-16 23:44:46 +02:00
parent 232843477c
commit dbec6edfa7
14 changed files with 164 additions and 131 deletions

View file

@ -32,7 +32,7 @@ const char *getAtrInfo(const char *atr_str) {
} }
for (int j = 0; j < slen; j++) { for (int j = 0; j < slen; j++) {
tmp_atr[j] = AtrTable[i].bytes[j]=='.' ? '.' : atr_str[j]; tmp_atr[j] = AtrTable[i].bytes[j] == '.' ? '.' : atr_str[j];
} }
if (strncmp(tmp_atr, AtrTable[i].bytes, slen) == 0) { if (strncmp(tmp_atr, AtrTable[i].bytes, slen) == 0) {

View file

@ -1012,7 +1012,7 @@ static int CmdAnalyseFreq(const char *Cmd) {
PrintAndLogEx(INFO, " 13.56 mHz has %f m, rf range %f m", len_1356, rf_range_1356); PrintAndLogEx(INFO, " 13.56 mHz has %f m, rf range %f m", len_1356, rf_range_1356);
if (F == 0 && C == 0 && L == 0) if (F == 0 && C == 0 && L == 0)
return PM3_SUCCESS; return PM3_SUCCESS;
@ -1021,22 +1021,22 @@ static int CmdAnalyseFreq(const char *Cmd) {
// From https://goodcalculators.com/resonant-frequency-calculator/ // From https://goodcalculators.com/resonant-frequency-calculator/
// Calc Resonant Frequency [Hz] // Calc Resonant Frequency [Hz]
// f = 1 / (2π √L C) // f = 1 / (2π √L C)
if (F == 0) { if (F == 0) {
double calc_freq = 1 / (2 * M_PI * sqrtf((L * C)) ); double calc_freq = 1 / (2 * M_PI * sqrtf((L * C)));
PrintAndLogEx(INFO, "Resonating Frequency %lf Hz", calc_freq); PrintAndLogEx(INFO, "Resonating Frequency %lf Hz", calc_freq);
} }
// Calc Inductance [H] // Calc Inductance [H]
// L = 1 / (4π2 f2 C) // L = 1 / (4π2 f2 C)
if (L == 0) { if (L == 0) {
double calc_inductance = 1 / (4 * (M_PI * M_PI) * (F * F) * C ); double calc_inductance = 1 / (4 * (M_PI * M_PI) * (F * F) * C);
PrintAndLogEx(INFO, "Inductance %lf Henries", calc_inductance); PrintAndLogEx(INFO, "Inductance %lf Henries", calc_inductance);
} }
// Capacitance [F] // Capacitance [F]
// C = 1 / (4π2 f2 L) // C = 1 / (4π2 f2 L)
if (C == 0) { if (C == 0) {
double calc_capacitance = 1 / (4 * (M_PI * M_PI) * (F * F) * L); double calc_capacitance = 1 / (4 * (M_PI * M_PI) * (F * F) * L);
PrintAndLogEx(INFO, "Capacitance %lf Farads", calc_capacitance); PrintAndLogEx(INFO, "Capacitance %lf Farads", calc_capacitance);
} }
return PM3_SUCCESS; return PM3_SUCCESS;

View file

@ -454,7 +454,7 @@ static int CmdrevengSearch(const char *Cmd) {
memset(result, 0, 30); memset(result, 0, 30);
char *inCRC = calloc(crcChars + 1, sizeof(char)); char *inCRC = calloc(crcChars + 1, sizeof(char));
if (inCRC == NULL) { if (inCRC == NULL) {
return 0; return 0;
} }
memcpy(inCRC, inHexStr + (dataLen - crcChars), crcChars); memcpy(inCRC, inHexStr + (dataLen - crcChars), crcChars);

View file

@ -2479,9 +2479,9 @@ void printIclassDumpContents(uint8_t *iclass_dump, uint8_t startblock, uint8_t e
PrintAndLogEx(INFO, " block# | data | ascii |lck| info"); PrintAndLogEx(INFO, " block# | data | ascii |lck| info");
PrintAndLogEx(INFO, "---------+-------------------------+----------+---+--------------"); PrintAndLogEx(INFO, "---------+-------------------------+----------+---+--------------");
PrintAndLogEx(INFO, " 0/0x00 | " _GREEN_("%s") "| " _GREEN_("%s") " | | CSN " PrintAndLogEx(INFO, " 0/0x00 | " _GREEN_("%s") "| " _GREEN_("%s") " | | CSN "
, sprint_hex(iclass_dump, 8) , sprint_hex(iclass_dump, 8)
, sprint_ascii(iclass_dump, 8) , sprint_ascii(iclass_dump, 8)
); );
if (i != 1) if (i != 1)
PrintAndLogEx(INFO, "...."); PrintAndLogEx(INFO, "....");
@ -2535,12 +2535,12 @@ void printIclassDumpContents(uint8_t *iclass_dump, uint8_t startblock, uint8_t e
} }
PrintAndLogEx(INFO, "%3d/0x%02X | %s | %s | %s " PrintAndLogEx(INFO, "%3d/0x%02X | %s | %s | %s "
, i , i
, i , i
, sprint_hex_ascii(blk, 8) , sprint_hex_ascii(blk, 8)
, lockstr , lockstr
, s , s
); );
} else { } else {
const char *info_ks[] = {"CSN", "Config", "E-purse", "Debit", "Credit", "AIA", "User"}; const char *info_ks[] = {"CSN", "Config", "E-purse", "Debit", "Credit", "AIA", "User"};
@ -2550,13 +2550,13 @@ void printIclassDumpContents(uint8_t *iclass_dump, uint8_t startblock, uint8_t e
} }
if (i >= 6 && i <= 9) { if (i >= 6 && i <= 9) {
PrintAndLogEx(INFO, "%3d/0x%02X | " _YELLOW_("%s") "| " _YELLOW_("%s") " | %s | %s " PrintAndLogEx(INFO, "%3d/0x%02X | " _YELLOW_("%s") "| " _YELLOW_("%s") " | %s | %s "
, i , i
, i , i
, sprint_hex(blk, 8) , sprint_hex(blk, 8)
, sprint_ascii(blk, 8) , sprint_ascii(blk, 8)
, lockstr , lockstr
, s , s
); );
} else { } else {
PrintAndLogEx(INFO, "%3d/0x%02X | %s | %s | %s ", i, i, sprint_hex_ascii(blk, 8), lockstr, s); PrintAndLogEx(INFO, "%3d/0x%02X | %s | %s | %s ", i, i, sprint_hex_ascii(blk, 8), lockstr, s);
} }

View file

@ -288,7 +288,7 @@ int applyIso14443a(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize, bool i
snprintf(exp, size, "AUTH-1 "); snprintf(exp, size, "AUTH-1 ");
break; break;
case MIFARE_ULC_AUTH_2: case MIFARE_ULC_AUTH_2:
if ((gs_mfuc_state == 2) && (cmdsize==19)){ if ((gs_mfuc_state == 2) && (cmdsize == 19)) {
memcpy(gs_mfuc_authdata[1], &cmd[1], 16); memcpy(gs_mfuc_authdata[1], &cmd[1], 16);
if (trace_mfuc_try_default_3des_keys(&gs_mfuc_key, gs_mfuc_state, gs_mfuc_authdata) == PM3_SUCCESS) { if (trace_mfuc_try_default_3des_keys(&gs_mfuc_key, gs_mfuc_state, gs_mfuc_authdata) == PM3_SUCCESS) {
// buffer too small to print the full key, // buffer too small to print the full key,
@ -371,26 +371,26 @@ int applyIso14443a(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize, bool i
return 0; return 0;
} }
} else { } else {
if (gs_mfuc_state==1) { if (gs_mfuc_state == 1) {
if ((cmd[0]==0xAF) && (cmdsize==11)) { if ((cmd[0] == 0xAF) && (cmdsize == 11)) {
// register RndB // register RndB
memcpy(gs_mfuc_authdata[0], &cmd[1], 8); memcpy(gs_mfuc_authdata[0], &cmd[1], 8);
gs_mfuc_state=2; gs_mfuc_state = 2;
} else { } else {
gs_mfuc_state=0; gs_mfuc_state = 0;
} }
} }
if (gs_mfuc_state==3) { if (gs_mfuc_state == 3) {
if ((cmd[0]==0x00) && (cmdsize==11)) { if ((cmd[0] == 0x00) && (cmdsize == 11)) {
// register RndA' // register RndA'
memcpy(gs_mfuc_authdata[2], &cmd[1], 8); memcpy(gs_mfuc_authdata[2], &cmd[1], 8);
if (trace_mfuc_try_default_3des_keys(&gs_mfuc_key, gs_mfuc_state, gs_mfuc_authdata) == PM3_SUCCESS) { if (trace_mfuc_try_default_3des_keys(&gs_mfuc_key, gs_mfuc_state, gs_mfuc_authdata) == PM3_SUCCESS) {
snprintf(exp, size, "AUTH-2 ANSW OK"); snprintf(exp, size, "AUTH-2 ANSW OK");
gs_mfuc_state=0; gs_mfuc_state = 0;
return 1; return 1;
} }
} }
gs_mfuc_state=0; gs_mfuc_state = 0;
} }
return 0; return 0;
} }

View file

@ -822,7 +822,7 @@ static int CmdHF14AMfDump(const char *Cmd) {
xdump.card_info = card; xdump.card_info = card;
xdump.dump = (uint8_t *)carddata; xdump.dump = (uint8_t *)carddata;
xdump.dumplen = bytes; xdump.dumplen = bytes;
saveFileJSON(dataFilename, jsfCardMemory, (uint8_t*)&xdump, sizeof(xdump), NULL); saveFileJSON(dataFilename, jsfCardMemory, (uint8_t *)&xdump, sizeof(xdump), NULL);
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -2603,7 +2603,7 @@ all_found:
xdump.card_info = card; xdump.card_info = card;
xdump.dump = dump; xdump.dump = dump;
xdump.dumplen = bytes; xdump.dumplen = bytes;
saveFileJSON(filename, jsfCardMemory, (uint8_t*)&xdump, sizeof(xdump), NULL); saveFileJSON(filename, jsfCardMemory, (uint8_t *)&xdump, sizeof(xdump), NULL);
// Generate and show statistics // Generate and show statistics
t1 = msclock() - t1; t1 = msclock() - t1;
@ -4008,7 +4008,7 @@ static int CmdHF14AMfESave(const char *Cmd) {
} }
xdump.dump = dump; xdump.dump = dump;
xdump.dumplen = bytes; xdump.dumplen = bytes;
saveFileJSON(filename, jsfCardMemory, (uint8_t*)&xdump, sizeof(xdump), NULL); saveFileJSON(filename, jsfCardMemory, (uint8_t *)&xdump, sizeof(xdump), NULL);
free(dump); free(dump);
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -4845,7 +4845,7 @@ static int CmdHF14AMfCSave(const char *Cmd) {
xdump.card_info = card; xdump.card_info = card;
xdump.dump = dump; xdump.dump = dump;
xdump.dumplen = bytes; xdump.dumplen = bytes;
saveFileJSON(filename, jsfCardMemory, (uint8_t*)&xdump, sizeof(xdump), NULL); saveFileJSON(filename, jsfCardMemory, (uint8_t *)&xdump, sizeof(xdump), NULL);
free(dump); free(dump);
return PM3_SUCCESS; return PM3_SUCCESS;
} }

View file

@ -269,8 +269,8 @@ static int trace_mfuc_try_key(uint8_t *key, int state, uint8_t (*authdata)[16])
mbedtls_des3_crypt_cbc(&ctx_des3, MBEDTLS_DES_DECRYPT, mbedtls_des3_crypt_cbc(&ctx_des3, MBEDTLS_DES_DECRYPT,
16, iv, authdata[1], RndARndB); 16, iv, authdata[1], RndARndB);
if ((memcmp(&RndB[1], &RndARndB[8], 7) == 0) && if ((memcmp(&RndB[1], &RndARndB[8], 7) == 0) &&
(RndB[0] == RndARndB[15])) { (RndB[0] == RndARndB[15])) {
return PM3_SUCCESS; return PM3_SUCCESS;
} }
break; break;
case 3: case 3:
@ -284,8 +284,8 @@ static int trace_mfuc_try_key(uint8_t *key, int state, uint8_t (*authdata)[16])
mbedtls_des3_crypt_cbc(&ctx_des3, MBEDTLS_DES_DECRYPT, mbedtls_des3_crypt_cbc(&ctx_des3, MBEDTLS_DES_DECRYPT,
8, iv, authdata[2], RndA); 8, iv, authdata[2], RndA);
if ((memcmp(&RndARndB[1], RndA, 7) == 0) && if ((memcmp(&RndARndB[1], RndA, 7) == 0) &&
(RndARndB[0] == RndA[7])) { (RndARndB[0] == RndA[7])) {
return PM3_SUCCESS; return PM3_SUCCESS;
} }
break; break;
default: default:

View file

@ -87,7 +87,7 @@ static int CmdNfcDecode(const char *Cmd) {
bool verbose = arg_get_lit(ctx, 3); bool verbose = arg_get_lit(ctx, 3);
CLIParserFree(ctx); CLIParserFree(ctx);
if (((datalen != 0) && (fnlen != 0)) || ((datalen == 0) && (fnlen == 0))){ if (((datalen != 0) && (fnlen != 0)) || ((datalen == 0) && (fnlen == 0))) {
PrintAndLogEx(ERR, "You must provide either data in hex or a filename"); PrintAndLogEx(ERR, "You must provide either data in hex or a filename");
return PM3_EINVARG; return PM3_EINVARG;
} }

View file

@ -368,7 +368,7 @@ int saveFileJSONex(const char *preferredName, JSONFileType ftype, uint8_t *data,
break; break;
} }
case jsfCardMemory: { case jsfCardMemory: {
iso14a_mf_extdump_t* xdump = (iso14a_mf_extdump_t*) data; iso14a_mf_extdump_t *xdump = (iso14a_mf_extdump_t *) data;
JsonSaveStr(root, "FileType", "mfcard"); JsonSaveStr(root, "FileType", "mfcard");
JsonSaveBufAsHexCompact(root, "$.Card.UID", xdump->card_info.uid, xdump->card_info.uidlen); JsonSaveBufAsHexCompact(root, "$.Card.UID", xdump->card_info.uid, xdump->card_info.uidlen);
JsonSaveBufAsHexCompact(root, "$.Card.ATQA", xdump->card_info.atqa, 2); JsonSaveBufAsHexCompact(root, "$.Card.ATQA", xdump->card_info.atqa, 2);

View file

@ -662,9 +662,9 @@ int mfStaticNested(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBl
uint32_t max_keys_chunk = keycnt > maxkeysinblock ? maxkeysinblock : keycnt; uint32_t max_keys_chunk = keycnt > maxkeysinblock ? maxkeysinblock : keycnt;
uint8_t *mem = NULL; uint8_t *mem = NULL;
uint8_t *p_keyblock = NULL; uint8_t *p_keyblock = NULL;
if (IfPm3Flash()) { if (IfPm3Flash()) {
// used for mfCheckKeys_file, which needs a header // used for mfCheckKeys_file, which needs a header
mem = calloc((maxkeysinblock * 6) + 5, sizeof(uint8_t)); mem = calloc((maxkeysinblock * 6) + 5, sizeof(uint8_t));

View file

@ -88,9 +88,12 @@
], ],
"offline": true, "offline": true,
"options": [ "options": [
"-h, --help this help" "-h, --help this help",
"-f, --freq <int> resonating frequency f in hertz (hz)",
"-l, --cap <int> capacitance c in micro farads (f)",
"-c, --ind <int> inductance in micro henries (h)"
], ],
"usage": "analyse freq [-h]" "usage": "analyse freq [-h] [-f <int>] [-l <int>] [-c <int>]"
}, },
"analyse help": { "analyse help": {
"command": "analyse help", "command": "analyse help",
@ -973,7 +976,7 @@
}, },
"help": { "help": {
"command": "help", "command": "help",
"description": "help use `<command> help` for details of a command prefs { edit client/device preferences... } -------- ----------------------- technology ----------------------- analyse { analyse utils... } data { plot window / data buffer manipulation... } emv { emv iso-14443 / iso-7816... } hf { high frequency commands... } hw { hardware commands... } lf { low frequency commands... } nfc { nfc commands... } reveng { crc calculations from reveng software... } smart { smart card iso-7816 commands... } script { scripting commands... } trace { trace manipulation... } wiegand { wiegand format manipulation... } -------- ----------------------- general ----------------------- clear clear screen hints turn hints on / off msleep add a pause in milliseconds rem add a text line in log file quit exit exit program [=] session log /home/phil/.proxmark3/logs/log_20210903.txt --------------------------------------------------------------------------------------- auto available offline: no run lf search / hf search / data plot / data save", "description": "help use `<command> help` for details of a command prefs { edit client/device preferences... } -------- ----------------------- technology ----------------------- analyse { analyse utils... } data { plot window / data buffer manipulation... } emv { emv iso-14443 / iso-7816... } hf { high frequency commands... } hw { hardware commands... } lf { low frequency commands... } nfc { nfc commands... } reveng { crc calculations from reveng software... } smart { smart card iso-7816 commands... } script { scripting commands... } trace { trace manipulation... } wiegand { wiegand format manipulation... } -------- ----------------------- general ----------------------- clear clear screen hints turn hints on / off msleep add a pause in milliseconds rem add a text line in log file quit exit exit program [=] session log /home/phil/.proxmark3/logs/log_20211016.txt --------------------------------------------------------------------------------------- auto available offline: no run lf search / hf search / data plot / data save",
"notes": [ "notes": [
"auto" "auto"
], ],
@ -1053,7 +1056,7 @@
"-r, --reset <number> minimum secondes before resetting the tag (to prevent timeout issues). default is 5 minutes", "-r, --reset <number> minimum secondes before resetting the tag (to prevent timeout issues). default is 5 minutes",
"-e, --error-limit <number> maximum times an status word other than 0x9000 or 0x6d00 is shown. default is 512.", "-e, --error-limit <number> maximum times an status word other than 0x9000 or 0x6d00 is shown. default is 512.",
"-s, --skip-ins <hex> do not test an instructions (can be specified multiple times)", "-s, --skip-ins <hex> do not test an instructions (can be specified multiple times)",
"-l, --with-le serach for apdus with le=0 (case 2s) as well", "-l, --with-le search for apdus with le=0 (case 2s) as well",
"-v, --verbose verbose output" "-v, --verbose verbose output"
], ],
"usage": "hf 14a apdufind [-hlv] [-c <hex>] [-i <hex>] [--p1 <hex>] [--p2 <hex>] [-r <number>] [-e <number>] [-s <hex>]..." "usage": "hf 14a apdufind [-hlv] [-c <hex>] [-i <hex>] [--p1 <hex>] [--p2 <hex>] [-r <number>] [-e <number>] [-s <hex>]..."
@ -1111,13 +1114,15 @@
"command": "hf 14a ndefread", "command": "hf 14a ndefread",
"description": "read nfc data exchange format (ndef) file on type 4 ndef tag", "description": "read nfc data exchange format (ndef) file on type 4 ndef tag",
"notes": [ "notes": [
"hf 14a ndefread" "hf 14a ndefread",
"hf 14a ndefread -f myfilename -> save raw ndef to file"
], ],
"offline": false, "offline": false,
"options": [ "options": [
"-h, --help this help" "-h, --help this help",
"-f, --file <fn> save raw ndef to file"
], ],
"usage": "hf 14a ndefread [-h]" "usage": "hf 14a ndefread [-h] [-f <fn>]"
}, },
"hf 14a raw": { "hf 14a raw": {
"command": "hf 14a raw", "command": "hf 14a raw",
@ -1279,13 +1284,15 @@
"command": "hf 14b ndefread", "command": "hf 14b ndefread",
"description": "print nfc data exchange format (ndef)", "description": "print nfc data exchange format (ndef)",
"notes": [ "notes": [
"hf 14b ndefread" "hf 14b ndefread",
"hf 14b ndefread -f myfilename -> save raw ndef to file"
], ],
"offline": false, "offline": false,
"options": [ "options": [
"-h, --help this help" "-h, --help this help",
"-f, --file <fn> save raw ndef to file"
], ],
"usage": "hf 14b ndefread [-h]" "usage": "hf 14b ndefread [-h] [-f <fn>]"
}, },
"hf 14b raw": { "hf 14b raw": {
"command": "hf 14b raw", "command": "hf 14b raw",
@ -2485,7 +2492,7 @@
}, },
"hf iclass help": { "hf iclass help": {
"command": "hf iclass help", "command": "hf iclass help",
"description": "----------- --------------------- operations --------------------- help this help info tag information list list iclass history ----------- --------------------- recovery --------------------- loclass use loclass to perform bruteforce reader attack lookup uses authentication trace to check for key in dictionary file ----------- --------------------- simulation --------------------- ----------- --------------------- utils --------------------- configcard reader configuration card calcnewkey calc diversified keys (blocks 3 & 4) to write new keys encode encode binary wiegand to block 7 encrypt encrypt given block data decrypt decrypt given block data or tag dump file managekeys manage keys to use with iclass commands view display content from tag dump file --------------------------------------------------------------------------------------- hf iclass dump available offline: no dump all memory from a iclass tag", "description": "----------- --------------------- operations --------------------- help this help info tag information list list iclass history ----------- --------------------- recovery --------------------- loclass use loclass to perform bruteforce reader attack lookup uses authentication trace to check for key in dictionary file ----------- --------------------- simulation --------------------- ----------- --------------------- utils --------------------- configcard reader configuration card calcnewkey calc diversified keys (blocks 3 & 4) to write new keys encode encode binary wiegand to block 7 encrypt encrypt given block data decrypt decrypt given block data or tag dump file managekeys manage keys to use with iclass commands permutekey permute function from 'heart of darkness' paper view display content from tag dump file --------------------------------------------------------------------------------------- hf iclass dump available offline: no dump all memory from a iclass tag",
"notes": [ "notes": [
"hf iclass dump -k 001122334455667b", "hf iclass dump -k 001122334455667b",
"hf iclass dump -k aaaaaaaaaaaaaaaa --credit 001122334455667b", "hf iclass dump -k aaaaaaaaaaaaaaaa --credit 001122334455667b",
@ -2603,7 +2610,7 @@
"hf iclass permutekey --reverse --key 0123456789abcdef", "hf iclass permutekey --reverse --key 0123456789abcdef",
"hf iclass permutekey --key ff55330f0055330f" "hf iclass permutekey --key ff55330f0055330f"
], ],
"offline": false, "offline": true,
"options": [ "options": [
"-h, --help this help", "-h, --help this help",
"-r, --reverse reverse permuted key", "-r, --reverse reverse permuted key",
@ -2673,7 +2680,7 @@
"command": "hf iclass sim", "command": "hf iclass sim",
"description": "simulate a iclass legacy/standard tag", "description": "simulate a iclass legacy/standard tag",
"notes": [ "notes": [
"hf iclass sim -t 0 --csn 031fec8af7ff12e0 -> simulate with specficied csn", "hf iclass sim -t 0 --csn 031fec8af7ff12e0 -> simulate with specified csn",
"hf iclass sim -t 1 -> simulate with default csn", "hf iclass sim -t 1 -> simulate with default csn",
"hf iclass sim -t 2 -> execute loclass attack online part", "hf iclass sim -t 2 -> execute loclass attack online part",
"hf iclass sim -t 3 -> simulate full iclass 2k tag", "hf iclass sim -t 3 -> simulate full iclass 2k tag",
@ -3688,7 +3695,8 @@
"notes": [ "notes": [
"hf mf ndefread -> shows ndef parsed data", "hf mf ndefread -> shows ndef parsed data",
"hf mf ndefread -vv -> shows ndef parsed and raw data", "hf mf ndefread -vv -> shows ndef parsed and raw data",
"hf mf ndefread --aid e103 -k ffffffffffff -b -> shows ndef data with custom aid, key and with key b" "hf mf ndefread --aid e103 -k ffffffffffff -b -> shows ndef data with custom aid, key and with key b",
"hf mf ndefread -f myfilename -> save raw ndef to file"
], ],
"offline": false, "offline": false,
"options": [ "options": [
@ -3696,9 +3704,10 @@
"-v, --verbose show technical data", "-v, --verbose show technical data",
"--aid <aid> replace default aid for ndef", "--aid <aid> replace default aid for ndef",
"-k, --key <key> replace default key for ndef", "-k, --key <key> replace default key for ndef",
"-b, --keyb use key b for access sectors (by default: key a)" "-b, --keyb use key b for access sectors (by default: key a)",
"-f, --file <fn> save raw ndef to file"
], ],
"usage": "hf mf ndefread [-hvb] [--aid <aid>] [-k <key>]" "usage": "hf mf ndefread [-hvb] [--aid <aid>] [-k <key>] [-f <fn>]"
}, },
"hf mf nested": { "hf mf nested": {
"command": "hf mf nested", "command": "hf mf nested",
@ -3791,7 +3800,7 @@
}, },
"hf mf restore": { "hf mf restore": {
"command": "hf mf restore", "command": "hf mf restore",
"description": "restore mifare classic binary file to tag. the key file and data file will program the card sector trailers. by default we authenticate to card with key b 0xffffffffffff. `--uid` param is used for filename templates `hf-mf-<uid>-dump.bin` and `hf-mf-<uid>-key.bin. if not specified, it will read the card uid instead. `-w` param you can indicate that the key file should be used for authentication instead. if so we also try both b/a keys", "description": "restore mifare classic binary file to tag. the key file and data file will program the card sector trailers. by default we authenticate to card with key b 0xffffffffffff. `--uid` param is used for filename templates `hf-mf-<uid>-dump.bin` and `hf-mf-<uid>-key.bin. if not specified, it will read the card uid instead. `--ka` param you can indicate that the key file should be used for authentication instead. if so we also try both b/a keys",
"notes": [ "notes": [
"hf mf restore", "hf mf restore",
"hf mf restore --1k --uid 04010203", "hf mf restore --1k --uid 04010203",
@ -4513,7 +4522,7 @@
}, },
"hf mfdes freemem": { "hf mfdes freemem": {
"command": "hf mfdes freemem", "command": "hf mfdes freemem",
"description": "get card's free memory. can be done with ot without authentication. master key may be provided.", "description": "get card's free memory. can be done with or without authentication. master key may be provided.",
"notes": [ "notes": [
"hf mfdes getfreemem -> execute with default factory setup" "hf mfdes getfreemem -> execute with default factory setup"
], ],
@ -5149,8 +5158,8 @@
"command": "hf mfp mad", "command": "hf mfp mad",
"description": "checks and prints mifare application directory (mad)", "description": "checks and prints mifare application directory (mad)",
"notes": [ "notes": [
"hf mfp mad -> shows mad if exists", "hf mfp mad",
"hf mfp mad --aid e103 -k d3f7d3f7d3f7d3f7d3f7d3f7d3f7d3f7 -> read and print ndef data from mad aid if exists" "hf mfp mad --aid e103 -k d3f7d3f7d3f7d3f7d3f7d3f7d3f7d3f7 -> read and print ndef data from mad aid"
], ],
"offline": false, "offline": false,
"options": [ "options": [
@ -5168,9 +5177,10 @@
"command": "hf mfp ndefread", "command": "hf mfp ndefread",
"description": "prints nfc data exchange format (ndef)", "description": "prints nfc data exchange format (ndef)",
"notes": [ "notes": [
"hf mfp ndefread -> shows ndef data", "hf mfp ndefread",
"hf mfp ndefread -vv -> shows ndef parsed and raw data", "hf mfp ndefread -vv -> shows ndef parsed and raw data",
"hf mfp ndefread --aid e103 -k d3f7d3f7d3f7d3f7d3f7d3f7d3f7d3f7 -> shows ndef data with custom aid and key" "hf mfp ndefread --aid e103 -k d3f7d3f7d3f7d3f7d3f7d3f7d3f7d3f7 -> shows ndef data with custom aid and key",
"hf mfp ndefread -f myfilename -> save raw ndef to file"
], ],
"offline": false, "offline": false,
"options": [ "options": [
@ -5178,9 +5188,10 @@
"-v, --verbose show technical data", "-v, --verbose show technical data",
"--aid <aid> replace default aid for ndef", "--aid <aid> replace default aid for ndef",
"-k, --key <key> replace default key for ndef", "-k, --key <key> replace default key for ndef",
"-b, --keyb use key b for access sectors (by default: key a)" "-b, --keyb use key b for access sectors (by default: key a)",
"-f, --file <fn> save raw ndef to file"
], ],
"usage": "hf mfp ndefread [-hvb] [--aid <aid>] [-k <key>]" "usage": "hf mfp ndefread [-hvb] [--aid <aid>] [-k <key>] [-f <fn>]"
}, },
"hf mfp rdbl": { "hf mfp rdbl": {
"command": "hf mfp rdbl", "command": "hf mfp rdbl",
@ -5205,8 +5216,8 @@
"command": "hf mfp rdsc", "command": "hf mfp rdsc",
"description": "reads one sector from mifare plus card", "description": "reads one sector from mifare plus card",
"notes": [ "notes": [
"hf mfp rdsc --sn 0 --key 000102030405060708090a0b0c0d0e0f -> executes authentication and read sector 0 data", "hf mfp rdsc -s 0 --key 000102030405060708090a0b0c0d0e0f -> executes authentication and read sector 0 data",
"hf mfp rdsc --sn 1 -v -> executes authentication and shows sector 1 data with default key" "hf mfp rdsc -s 1 -v -> executes authentication and shows sector 1 data with default key"
], ],
"offline": false, "offline": false,
"options": [ "options": [
@ -5214,17 +5225,17 @@
"-v, --verbose show internal data.", "-v, --verbose show internal data.",
"-b, --keyb use key b (by default keya).", "-b, --keyb use key b (by default keya).",
"-p, --plain plain communication mode between reader and card.", "-p, --plain plain communication mode between reader and card.",
"--sn <dec> sector number (0..255)", "-s, --sn <dec> sector number (0..255)",
"-k, --key <hex> key, 16 hex bytes" "-k, --key <hex> key, 16 hex bytes"
], ],
"usage": "hf mfp rdsc [-hvbp] --sn <dec> [-k <hex>]" "usage": "hf mfp rdsc [-hvbp] -s <dec> [-k <hex>]"
}, },
"hf mfp wrbl": { "hf mfp wrbl": {
"command": "hf mfp wrbl", "command": "hf mfp wrbl",
"description": "writes one block to mifare plus card", "description": "writes one block to mifare plus card",
"notes": [ "notes": [
"hf mfp wrbl --blk 1 -d ff0000000000000000000000000000ff --key 000102030405060708090a0b0c0d0e0f -> writes block 1 data", "hf mfp wrbl --blk 1 -d ff0000000000000000000000000000ff --key 000102030405060708090a0b0c0d0e0f -> write block 1 data",
"hf mfp wrbl --blk 2 -d ff0000000000000000000000000000ff -v -> writes block 2 data with default key 0xff..0xff" "hf mfp wrbl --blk 2 -d ff0000000000000000000000000000ff -v -> write block 2 data with default key 0xff..0xff"
], ],
"offline": false, "offline": false,
"options": [ "options": [
@ -5248,10 +5259,10 @@
"options": [ "options": [
"-h, --help this help", "-h, --help this help",
"-v, --verbose show internal data.", "-v, --verbose show internal data.",
"-i, --ki <hex> key number, 2 hex bytes", "--ki <hex> key number, 2 hex bytes",
"--key <hex> key, 16 hex bytes" "--key <hex> key, 16 hex bytes"
], ],
"usage": "hf mfp wrp [-hv] -i <hex> [--key <hex>]..." "usage": "hf mfp wrp [-hv] --ki <hex> [--key <hex>]..."
}, },
"hf mfu cauth": { "hf mfu cauth": {
"command": "hf mfu cauth", "command": "hf mfu cauth",
@ -5263,11 +5274,11 @@
"offline": false, "offline": false,
"options": [ "options": [
"-h, --help this help", "-h, --help this help",
"-k, --key <hex> key for authentication (ul-c 16 bytes)", "--key <hex> key for authentication (ul-c 16 bytes)",
"-l swap entered key's endianness", "-l swap entered key's endianness",
"-k keep field on (only if a password is provided too)" "-k keep field on (only if a password is provided too)"
], ],
"usage": "hf mfu cauth [-hlk] [-k <hex>]" "usage": "hf mfu cauth [-hlk] [--key <hex>]"
}, },
"hf mfu dump": { "hf mfu dump": {
"command": "hf mfu dump", "command": "hf mfu dump",
@ -5354,14 +5365,16 @@
"description": "prints nfc data exchange format (ndef)", "description": "prints nfc data exchange format (ndef)",
"notes": [ "notes": [
"hf mfu ndefread -> shows ndef data", "hf mfu ndefread -> shows ndef data",
"hf mfu ndefread -k ffffffff -> shows ndef data with key" "hf mfu ndefread -k ffffffff -> shows ndef data with key",
"hf mfu ndefread -f myfilename -> save raw ndef to file"
], ],
"offline": false, "offline": false,
"options": [ "options": [
"-h, --help this help", "-h, --help this help",
"-l swap entered key's endianness" "-l swap entered key's endianness",
"-f, --file <fn> save raw ndef to file"
], ],
"usage": "hf mfu ndefread [-hl] [-k replace default key for ndef]" "usage": "hf mfu ndefread [-hl] [-k replace default key for ndef] [-f <fn>]"
}, },
"hf mfu otptear": { "hf mfu otptear": {
"command": "hf mfu otptear", "command": "hf mfu otptear",
@ -5416,7 +5429,7 @@
"-h, --help this help", "-h, --help this help",
"-k, --key <hex> key for authentication (ul-c 16 bytes, ev1/ntag 4 bytes)", "-k, --key <hex> key for authentication (ul-c 16 bytes, ev1/ntag 4 bytes)",
"-l swap entered key's endianness", "-l swap entered key's endianness",
"-b, --block <dec> block number to write" "-b, --block <dec> block number to read"
], ],
"usage": "hf mfu rdbl [-hl] [-k <hex>] -b <dec>" "usage": "hf mfu rdbl [-hl] [-k <hex>] -b <dec>"
}, },
@ -5601,14 +5614,16 @@
"command": "hf st25ta ndefread", "command": "hf st25ta ndefread",
"description": "read nfc data exchange format (ndef) file on st25ta", "description": "read nfc data exchange format (ndef) file on st25ta",
"notes": [ "notes": [
"hf st25ta ndefread -p 82e80053d4ca5c0b656d852cc696c8a1" "hf st25ta ndefread -p 82e80053d4ca5c0b656d852cc696c8a1",
"hf st25ta ndefread -f myfilename -> save raw ndef to file"
], ],
"offline": true, "offline": true,
"options": [ "options": [
"-h, --help this help", "-h, --help this help",
"-p, --pwd <hex> 16 byte read password" "-p, --pwd <hex> 16 byte read password",
"-f, --file <fn> save raw ndef to file"
], ],
"usage": "hf st25ta ndefread [-h] [-p <hex>]" "usage": "hf st25ta ndefread [-h] [-p <hex>] [-f <fn>]"
}, },
"hf st25ta protect": { "hf st25ta protect": {
"command": "hf st25ta protect", "command": "hf st25ta protect",
@ -5730,14 +5745,16 @@
"command": "hf topaz info", "command": "hf topaz info",
"description": "get info from topaz tags", "description": "get info from topaz tags",
"notes": [ "notes": [
"hf topaz info" "hf topaz info",
"hf topaz info -f myfilename -> save raw ndef to file"
], ],
"offline": false, "offline": false,
"options": [ "options": [
"-h, --help this help", "-h, --help this help",
"-f, --file <fn> save raw ndef to file",
"-v, --verbose verbose output" "-v, --verbose verbose output"
], ],
"usage": "hf topaz info [-hv]" "usage": "hf topaz info [-hv] [-f <fn>]"
}, },
"hf topaz raw": { "hf topaz raw": {
"command": "hf topaz raw", "command": "hf topaz raw",
@ -5902,7 +5919,7 @@
}, },
"hw help": { "hw help": {
"command": "hw help", "command": "hw help",
"description": "------------- ----------------------- hardware ----------------------- help this help connect connect proxmark3 to serial port --------------------------------------------------------------------------------------- hw break available offline: no send break loop package", "description": "------------- ----------------------- hardware ----------------------- help this help connect connect proxmark3 to serial port version show version information about the client and the connected proxmark3, if any --------------------------------------------------------------------------------------- hw break available offline: no send break loop package",
"notes": [ "notes": [
"hw break" "hw break"
], ],
@ -6076,11 +6093,11 @@
}, },
"hw version": { "hw version": {
"command": "hw version", "command": "hw version",
"description": "show version information about the connected proxmark3", "description": "show version information about the client and the connected proxmark3",
"notes": [ "notes": [
"hw version" "hw version"
], ],
"offline": false, "offline": true,
"options": [ "options": [
"-h, --help this help" "-h, --help this help"
], ],
@ -9282,18 +9299,20 @@
}, },
"nfc help": { "nfc help": {
"command": "nfc help", "command": "nfc help",
"description": "-------- --------------------- nfc tags -------------------- type1 { nfc forum tag type 1... } type2 { nfc forum tag type 2... } type4a { nfc forum tag type 4 iso14443a... } type4b { nfc forum tag type 4 iso14443b... } mf { nfc type mifare classic/plus tag... } barcode { nfc barcode tag... } -------- --------------------- general --------------------- help this help decode decode ndef records --------------------------------------------------------------------------------------- nfc decode available offline: yes decode and print nfc data exchange format (ndef)", "description": "-------- --------------------- nfc tags -------------------- type1 { nfc forum tag type 1... } type2 { nfc forum tag type 2... } type4a { nfc forum tag type 4 iso14443a... } type4b { nfc forum tag type 4 iso14443b... } mf { nfc type mifare classic/plus tag... } barcode { nfc barcode tag... } -------- --------------------- general --------------------- help this help decode decode ndef records --------------------------------------------------------------------------------------- nfc decode available offline: yes decode and print nfc data exchange format (ndef) you must provide either data in hex or a filename, but not both",
"notes": [ "notes": [
"nfc decode -d 9101085402656e48656c6c6f5101085402656e576f726c64", "nfc decode -d 9101085402656e48656c6c6f5101085402656e576f726c64",
"nfc decode -d 0103d020240203e02c040300fe" "nfc decode -d 0103d020240203e02c040300fe",
"nfc decode -f myfilename"
], ],
"offline": true, "offline": true,
"options": [ "options": [
"-h, --help this help", "-h, --help this help",
"-d, --data <hex> ndef data to decode", "-d, --data <hex> ndef data to decode",
"-f, --file <fn> file to load",
"-v, --verbose verbose mode" "-v, --verbose verbose mode"
], ],
"usage": "nfc decode [-hv] [-d <hex>]..." "usage": "nfc decode [-hv] [-d <hex>]... [-f <fn>]"
}, },
"nfc mf help": { "nfc mf help": {
"command": "nfc mf help", "command": "nfc mf help",
@ -9311,9 +9330,10 @@
"command": "nfc mf pread", "command": "nfc mf pread",
"description": "prints nfc data exchange format (ndef)", "description": "prints nfc data exchange format (ndef)",
"notes": [ "notes": [
"hf mfp ndefread -> shows ndef data", "hf mfp ndefread",
"hf mfp ndefread -vv -> shows ndef parsed and raw data", "hf mfp ndefread -vv -> shows ndef parsed and raw data",
"hf mfp ndefread --aid e103 -k d3f7d3f7d3f7d3f7d3f7d3f7d3f7d3f7 -> shows ndef data with custom aid and key" "hf mfp ndefread --aid e103 -k d3f7d3f7d3f7d3f7d3f7d3f7d3f7d3f7 -> shows ndef data with custom aid and key",
"hf mfp ndefread -f myfilename -> save raw ndef to file"
], ],
"offline": false, "offline": false,
"options": [ "options": [
@ -9321,73 +9341,84 @@
"-v, --verbose show technical data", "-v, --verbose show technical data",
"--aid <aid> replace default aid for ndef", "--aid <aid> replace default aid for ndef",
"-k, --key <key> replace default key for ndef", "-k, --key <key> replace default key for ndef",
"-b, --keyb use key b for access sectors (by default: key a)" "-b, --keyb use key b for access sectors (by default: key a)",
"-f, --file <fn> save raw ndef to file"
], ],
"usage": "hf mfp ndefread [-hvb] [--aid <aid>] [-k <key>]" "usage": "hf mfp ndefread [-hvb] [--aid <aid>] [-k <key>] [-f <fn>]"
}, },
"nfc type1 help": { "nfc type1 help": {
"command": "nfc type1 help", "command": "nfc type1 help",
"description": "-------- -------------- nfc forum tag type 1 --------------- -------- --------------------- general --------------------- help this help ======================================================================================= nfc type2 { nfc forum tag type 2... } --------------------------------------------------------------------------------------- nfc type2 read available offline: no prints nfc data exchange format (ndef)", "description": "-------- -------------- nfc forum tag type 1 --------------- -------- --------------------- general --------------------- help this help ======================================================================================= nfc type2 { nfc forum tag type 2... } --------------------------------------------------------------------------------------- nfc type2 read available offline: no prints nfc data exchange format (ndef)",
"notes": [ "notes": [
"hf mfu ndefread -> shows ndef data", "hf mfu ndefread -> shows ndef data",
"hf mfu ndefread -k ffffffff -> shows ndef data with key" "hf mfu ndefread -k ffffffff -> shows ndef data with key",
"hf mfu ndefread -f myfilename -> save raw ndef to file"
], ],
"offline": true, "offline": true,
"options": [ "options": [
"-h, --help this help", "-h, --help this help",
"-l swap entered key's endianness" "-l swap entered key's endianness",
"-f, --file <fn> save raw ndef to file"
], ],
"usage": "hf mfu ndefread [-hl] [-k replace default key for ndef]" "usage": "hf mfu ndefread [-hl] [-k replace default key for ndef] [-f <fn>]"
}, },
"nfc type1 read": { "nfc type1 read": {
"command": "nfc type1 read", "command": "nfc type1 read",
"description": "get info from topaz tags", "description": "get info from topaz tags",
"notes": [ "notes": [
"hf topaz info" "hf topaz info",
"hf topaz info -f myfilename -> save raw ndef to file"
], ],
"offline": false, "offline": false,
"options": [ "options": [
"-h, --help this help", "-h, --help this help",
"-f, --file <fn> save raw ndef to file",
"-v, --verbose verbose output" "-v, --verbose verbose output"
], ],
"usage": "hf topaz info [-hv]" "usage": "hf topaz info [-hv] [-f <fn>]"
}, },
"nfc type2 help": { "nfc type2 help": {
"command": "nfc type2 help", "command": "nfc type2 help",
"description": "-------- -------------- nfc forum tag type 2 --------------- -------- --------------------- general --------------------- help this help ======================================================================================= nfc type4a { nfc forum tag type 4 iso14443a... } --------------------------------------------------------------------------------------- nfc type4a read available offline: no read nfc data exchange format (ndef) file on type 4 ndef tag", "description": "-------- -------------- nfc forum tag type 2 --------------- -------- --------------------- general --------------------- help this help ======================================================================================= nfc type4a { nfc forum tag type 4 iso14443a... } --------------------------------------------------------------------------------------- nfc type4a read available offline: no read nfc data exchange format (ndef) file on type 4 ndef tag",
"notes": [ "notes": [
"hf 14a ndefread" "hf 14a ndefread",
"hf 14a ndefread -f myfilename -> save raw ndef to file"
], ],
"offline": true, "offline": true,
"options": [ "options": [
"-h, --help this help" "-h, --help this help",
"-f, --file <fn> save raw ndef to file"
], ],
"usage": "hf 14a ndefread [-h]" "usage": "hf 14a ndefread [-h] [-f <fn>]"
}, },
"nfc type4a help": { "nfc type4a help": {
"command": "nfc type4a help", "command": "nfc type4a help",
"description": "-------- --------- nfc forum tag type 4 iso14443a ---------- -------- --------------------- general --------------------- help this help ======================================================================================= nfc type4b { nfc forum tag type 4 iso14443b... } --------------------------------------------------------------------------------------- nfc type4b read available offline: no print nfc data exchange format (ndef)", "description": "-------- --------- nfc forum tag type 4 iso14443a ---------- -------- --------------------- general --------------------- help this help ======================================================================================= nfc type4b { nfc forum tag type 4 iso14443b... } --------------------------------------------------------------------------------------- nfc type4b read available offline: no print nfc data exchange format (ndef)",
"notes": [ "notes": [
"hf 14b ndefread" "hf 14b ndefread",
"hf 14b ndefread -f myfilename -> save raw ndef to file"
], ],
"offline": true, "offline": true,
"options": [ "options": [
"-h, --help this help" "-h, --help this help",
"-f, --file <fn> save raw ndef to file"
], ],
"usage": "hf 14b ndefread [-h]" "usage": "hf 14b ndefread [-h] [-f <fn>]"
}, },
"nfc type4a st25taread": { "nfc type4a st25taread": {
"command": "nfc type4a st25taread", "command": "nfc type4a st25taread",
"description": "read nfc data exchange format (ndef) file on st25ta", "description": "read nfc data exchange format (ndef) file on st25ta",
"notes": [ "notes": [
"hf st25ta ndefread -p 82e80053d4ca5c0b656d852cc696c8a1" "hf st25ta ndefread -p 82e80053d4ca5c0b656d852cc696c8a1",
"hf st25ta ndefread -f myfilename -> save raw ndef to file"
], ],
"offline": false, "offline": false,
"options": [ "options": [
"-h, --help this help", "-h, --help this help",
"-p, --pwd <hex> 16 byte read password" "-p, --pwd <hex> 16 byte read password",
"-f, --file <fn> save raw ndef to file"
], ],
"usage": "hf st25ta ndefread [-h] [-p <hex>]" "usage": "hf st25ta ndefread [-h] [-p <hex>] [-f <fn>]"
}, },
"nfc type4b help": { "nfc type4b help": {
"command": "nfc type4b help", "command": "nfc type4b help",
@ -9395,7 +9426,8 @@
"notes": [ "notes": [
"hf mf ndefread -> shows ndef parsed data", "hf mf ndefread -> shows ndef parsed data",
"hf mf ndefread -vv -> shows ndef parsed and raw data", "hf mf ndefread -vv -> shows ndef parsed and raw data",
"hf mf ndefread --aid e103 -k ffffffffffff -b -> shows ndef data with custom aid, key and with key b" "hf mf ndefread --aid e103 -k ffffffffffff -b -> shows ndef data with custom aid, key and with key b",
"hf mf ndefread -f myfilename -> save raw ndef to file"
], ],
"offline": true, "offline": true,
"options": [ "options": [
@ -9403,9 +9435,10 @@
"-v, --verbose show technical data", "-v, --verbose show technical data",
"--aid <aid> replace default aid for ndef", "--aid <aid> replace default aid for ndef",
"-k, --key <key> replace default key for ndef", "-k, --key <key> replace default key for ndef",
"-b, --keyb use key b for access sectors (by default: key a)" "-b, --keyb use key b for access sectors (by default: key a)",
"-f, --file <fn> save raw ndef to file"
], ],
"usage": "hf mf ndefread [-hvb] [--aid <aid>] [-k <key>]" "usage": "hf mf ndefread [-hvb] [--aid <aid>] [-k <key>] [-f <fn>]"
}, },
"prefs get barmode": { "prefs get barmode": {
"command": "prefs get barmode", "command": "prefs get barmode",
@ -9517,7 +9550,7 @@
}, },
"prefs set clientdebug": { "prefs set clientdebug": {
"command": "prefs set clientdebug", "command": "prefs set clientdebug",
"description": "set presistent preference of using clientside debug level", "description": "set persistent preference of using clientside debug level",
"notes": [ "notes": [
"prefs set clientdebug --simple" "prefs set clientdebug --simple"
], ],
@ -9532,7 +9565,7 @@
}, },
"prefs set clientdelay": { "prefs set clientdelay": {
"command": "prefs set clientdelay", "command": "prefs set clientdelay",
"description": "set presistent preference of delay before executing a command in the client", "description": "set persistent preference of delay before executing a command in the client",
"notes": [ "notes": [
"prefs set clientdelay --ms 0 -> unsets any delay", "prefs set clientdelay --ms 0 -> unsets any delay",
"prefs set clientdelay --ms 1000 -> sets 1000ms delay" "prefs set clientdelay --ms 1000 -> sets 1000ms delay"
@ -9546,7 +9579,7 @@
}, },
"prefs set color": { "prefs set color": {
"command": "prefs set color", "command": "prefs set color",
"description": "set presistent preference of using colors in the client", "description": "set persistent preference of using colors in the client",
"notes": [ "notes": [
"prefs set color --ansi" "prefs set color --ansi"
], ],
@ -9560,7 +9593,7 @@
}, },
"prefs set emoji": { "prefs set emoji": {
"command": "prefs set emoji", "command": "prefs set emoji",
"description": "set presistent preference of using emojis in the client", "description": "set persistent preference of using emojis in the client",
"notes": [ "notes": [
"prefs set emoji --alias" "prefs set emoji --alias"
], ],
@ -9576,7 +9609,7 @@
}, },
"prefs set help": { "prefs set help": {
"command": "prefs set help", "command": "prefs set help",
"description": "help this help barmode set bar mode clientdebug set client debug level clientdelay set client execution delay color set color support emoji set emoji display hints set hint display savepaths ... to be adjusted next ... plotsliders set plot slider display --------------------------------------------------------------------------------------- prefs set barmode available offline: yes set presistent preference of hf/lf tune command styled output in the client", "description": "help this help barmode set bar mode clientdebug set client debug level clientdelay set client execution delay color set color support emoji set emoji display hints set hint display savepaths ... to be adjusted next ... plotsliders set plot slider display --------------------------------------------------------------------------------------- prefs set barmode available offline: yes set persistent preference of hf/lf tune command styled output in the client",
"notes": [ "notes": [
"prefs set barmode --mix" "prefs set barmode --mix"
], ],
@ -9591,7 +9624,7 @@
}, },
"prefs set hints": { "prefs set hints": {
"command": "prefs set hints", "command": "prefs set hints",
"description": "set presistent preference of showing hint messages in the client", "description": "set persistent preference of showing hint messages in the client",
"notes": [ "notes": [
"prefs set hints --on" "prefs set hints --on"
], ],
@ -9605,7 +9638,7 @@
}, },
"prefs set plotsliders": { "prefs set plotsliders": {
"command": "prefs set plotsliders", "command": "prefs set plotsliders",
"description": "set presistent preference of showing the plotslider control in the client", "description": "set persistent preference of showing the plotslider control in the client",
"notes": [ "notes": [
"prefs set plotsliders --on" "prefs set plotsliders --on"
], ],
@ -9619,7 +9652,7 @@
}, },
"prefs set savepaths": { "prefs set savepaths": {
"command": "prefs set savepaths", "command": "prefs set savepaths",
"description": "set presistent preference of file paths in the client", "description": "set persistent preference of file paths in the client",
"notes": [ "notes": [
"prefs set savepaths --dump /home/mydumpfolder -> all dump files will be saved into this folder", "prefs set savepaths --dump /home/mydumpfolder -> all dump files will be saved into this folder",
"prefs set savepaths --def /home/myfolder -c -> create if needed, all files will be saved into this folder" "prefs set savepaths --def /home/myfolder -c -> create if needed, all files will be saved into this folder"
@ -10000,6 +10033,6 @@
"metadata": { "metadata": {
"commands_extracted": 589, "commands_extracted": 589,
"extracted_by": "PM3Help2JSON v1.00", "extracted_by": "PM3Help2JSON v1.00",
"extracted_on": "2021-09-03T21:05:08" "extracted_on": "2021-10-16T21:43:45"
} }
} }

View file

@ -358,7 +358,7 @@ Check column "offline" for their availability.
|`hf iclass encrypt `|Y |`Encrypt given block data` |`hf iclass encrypt `|Y |`Encrypt given block data`
|`hf iclass decrypt `|Y |`Decrypt given block data or tag dump file` |`hf iclass decrypt `|Y |`Decrypt given block data or tag dump file`
|`hf iclass managekeys `|Y |`Manage keys to use with iclass commands` |`hf iclass managekeys `|Y |`Manage keys to use with iclass commands`
|`hf iclass permutekey `|N |`Permute function from 'heart of darkness' paper` |`hf iclass permutekey `|Y |`Permute function from 'heart of darkness' paper`
|`hf iclass view `|Y |`Display content from tag dump file` |`hf iclass view `|Y |`Display content from tag dump file`
@ -630,7 +630,7 @@ Check column "offline" for their availability.
|`hw tearoff `|N |`Program a tearoff hook for the next command supporting tearoff` |`hw tearoff `|N |`Program a tearoff hook for the next command supporting tearoff`
|`hw tia `|N |`Trigger a Timing Interval Acquisition to re-adjust the RealTimeCounter divider` |`hw tia `|N |`Trigger a Timing Interval Acquisition to re-adjust the RealTimeCounter divider`
|`hw tune `|N |`Measure antenna tuning` |`hw tune `|N |`Measure antenna tuning`
|`hw version `|N |`Show version information about the connected Proxmark3` |`hw version `|Y |`Show version information about the client and the connected Proxmark3, if any`
### lf ### lf

6
pm3
View file

@ -135,7 +135,7 @@ function get_pm3_list_macOS {
function get_pm3_list_Windows { function get_pm3_list_Windows {
N=$1 N=$1
PM3LIST=() PM3LIST=()
# Normal SERIAL PORTS (COM) # Normal SERIAL PORTS (COM)
for DEV in $(wmic /locale:ms_409 path Win32_SerialPort Where "PNPDeviceID LIKE '%VID_9AC4&PID_4B8F%' Or PNPDeviceID LIKE '%VID_2D2D&PID_504D%'" Get DeviceID 2>/dev/null | awk -b '/^COM/{print $1}'); do for DEV in $(wmic /locale:ms_409 path Win32_SerialPort Where "PNPDeviceID LIKE '%VID_9AC4&PID_4B8F%' Or PNPDeviceID LIKE '%VID_2D2D&PID_504D%'" Get DeviceID 2>/dev/null | awk -b '/^COM/{print $1}'); do
DEV=${DEV/ */} DEV=${DEV/ */}
@ -151,7 +151,7 @@ function get_pm3_list_Windows {
return return
fi fi
done done
#BT direct SERIAL PORTS (COM) #BT direct SERIAL PORTS (COM)
if $FINDBTRFCOMM; then if $FINDBTRFCOMM; then
for DEV in $(wmic /locale:ms_409 path Win32_PnPEntity Where "Caption LIKE '%Bluetooth%(COM%'" Get Name 2> /dev/null | awk -b 'match($0,/(COM[0-9]+)/,m){print m[1]}'); do for DEV in $(wmic /locale:ms_409 path Win32_PnPEntity Where "Caption LIKE '%Bluetooth%(COM%'" Get Name 2> /dev/null | awk -b 'match($0,/(COM[0-9]+)/,m){print m[1]}'); do
@ -178,7 +178,7 @@ function get_pm3_list_Windows {
function get_pm3_list_WSL { function get_pm3_list_WSL {
N=$1 N=$1
PM3LIST=() PM3LIST=()
# Normal SERIAL PORTS (COM) # Normal SERIAL PORTS (COM)
for DEV in $($PSHEXE -command "Get-CimInstance -ClassName Win32_serialport | Where-Object {\$_.PNPDeviceID -like '*VID_9AC4&PID_4B8F*' -or \$_.PNPDeviceID -like '*VID_2D2D&PID_504D*'} | Select -expandproperty DeviceID" 2>/dev/null | tr -dc '[:print:]'); do for DEV in $($PSHEXE -command "Get-CimInstance -ClassName Win32_serialport | Where-Object {\$_.PNPDeviceID -like '*VID_9AC4&PID_4B8F*' -or \$_.PNPDeviceID -like '*VID_2D2D&PID_504D*'} | Select -expandproperty DeviceID" 2>/dev/null | tr -dc '[:print:]'); do
_comport=$DEV _comport=$DEV

View file

@ -442,7 +442,7 @@ static void score_traces(struct guess *g, unsigned int size) {
// then shift by size - 16, insert upper key XOR enc_nonce XOR bitstream, // then shift by size - 16, insert upper key XOR enc_nonce XOR bitstream,
// and calc new bit b // and calc new bit b
uint64_t lfsr = (uid >> (size - 16)) | ((g->key << (48 - size)) ^ uint64_t lfsr = (uid >> (size - 16)) | ((g->key << (48 - size)) ^
((nonces[i].enc_nR ^ g->b0to31[i]) << (64 - size))); ((nonces[i].enc_nR ^ g->b0to31[i]) << (64 - size)));
g->b0to31[i] = g->b0to31[i] | (ht2crypt(lfsr) << (size - 16)); g->b0to31[i] = g->b0to31[i] | (ht2crypt(lfsr) << (size - 16));
// create lfsr - lower 16 bits are lower 16 bits of key // create lfsr - lower 16 bits are lower 16 bits of key