mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-07-16 10:03:04 -07:00
make style
This commit is contained in:
parent
ec820db997
commit
29f1147aad
24 changed files with 292 additions and 277 deletions
|
@ -1520,13 +1520,13 @@ static void PacketReceived(PacketCommandNG *packet) {
|
|||
break;
|
||||
}
|
||||
case CMD_HF_ICLASS_SIMULATE: {
|
||||
/*
|
||||
struct p {
|
||||
uint8_t reader[4];
|
||||
uint8_t mac[4];
|
||||
} PACKED;
|
||||
struct p *payload = (struct p *) packet->data.asBytes;
|
||||
*/
|
||||
/*
|
||||
struct p {
|
||||
uint8_t reader[4];
|
||||
uint8_t mac[4];
|
||||
} PACKED;
|
||||
struct p *payload = (struct p *) packet->data.asBytes;
|
||||
*/
|
||||
|
||||
SimulateIClass(packet->oldarg[0], packet->oldarg[1], packet->oldarg[2], packet->data.asBytes);
|
||||
break;
|
||||
|
@ -1562,7 +1562,7 @@ static void PacketReceived(PacketCommandNG *packet) {
|
|||
break;
|
||||
}
|
||||
case CMD_HF_ICLASS_RESTORE: {
|
||||
iClass_Restore( (iclass_restore_req_t *)packet->data.asBytes);
|
||||
iClass_Restore((iclass_restore_req_t *)packet->data.asBytes);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -889,18 +889,18 @@ static int write(uint8_t word[4], uint8_t address) {
|
|||
return PM3_ETEAROFF;
|
||||
} else {
|
||||
|
||||
// wait for T0 * EM4X50_T_TAG_TWA (write access time)
|
||||
wait_timer(FPGA_TIMER_0, T0 * EM4X50_T_TAG_TWA);
|
||||
// wait for T0 * EM4X50_T_TAG_TWA (write access time)
|
||||
wait_timer(FPGA_TIMER_0, T0 * EM4X50_T_TAG_TWA);
|
||||
|
||||
// look for ACK sequence
|
||||
if (check_ack(false)) {
|
||||
// look for ACK sequence
|
||||
if (check_ack(false)) {
|
||||
|
||||
// now EM4x50 needs T0 * EM4X50_T_TAG_TWEE (EEPROM write time)
|
||||
// for saving data and should return with ACK
|
||||
if (check_ack(false))
|
||||
return PM3_SUCCESS;
|
||||
// now EM4x50 needs T0 * EM4X50_T_TAG_TWEE (EEPROM write time)
|
||||
// for saving data and should return with ACK
|
||||
if (check_ack(false))
|
||||
return PM3_SUCCESS;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
|
@ -1443,7 +1443,7 @@ void ReaderIClass(uint8_t flags) {
|
|||
// with 0xFF:s in block 3 and 4.
|
||||
|
||||
LED_B_ON();
|
||||
reply_mix(CMD_ACK, result_status, 0, 0, (uint8_t*)&hdr, sizeof(hdr));
|
||||
reply_mix(CMD_ACK, result_status, 0, 0, (uint8_t *)&hdr, sizeof(hdr));
|
||||
|
||||
//Send back to client, but don't bother if we already sent this -
|
||||
// only useful if looping in arm (not try_once && not abort_after_read)
|
||||
|
@ -1489,7 +1489,7 @@ bool authenticate_iclass_tag(iclass_auth_req_t *payload, picopass_hdr *hdr, uint
|
|||
|
||||
memcpy(ccnr, hdr->epurse, sizeof(hdr->epurse));
|
||||
|
||||
if ( payload->use_replay) {
|
||||
if (payload->use_replay) {
|
||||
|
||||
memcpy(pmac, payload->key + 4, 4);
|
||||
memcpy(cmd_check + 1, payload->key, 8);
|
||||
|
@ -1872,11 +1872,11 @@ void iClass_WriteBlock(uint8_t *msg) {
|
|||
iclass_send_as_reader(write, sizeof(write), &start_time, &eof_time);
|
||||
|
||||
if (tearoff_hook() == PM3_ETEAROFF) { // tearoff occured
|
||||
res = false;
|
||||
switch_off();
|
||||
if (payload->req.send_reply)
|
||||
reply_ng(CMD_HF_ICLASS_WRITEBL, PM3_ETEAROFF, (uint8_t *)&res, sizeof(uint8_t));
|
||||
return;
|
||||
res = false;
|
||||
switch_off();
|
||||
if (payload->req.send_reply)
|
||||
reply_ng(CMD_HF_ICLASS_WRITEBL, PM3_ETEAROFF, (uint8_t *)&res, sizeof(uint8_t));
|
||||
return;
|
||||
} else {
|
||||
|
||||
if (GetIso15693AnswerFromTag(resp, sizeof(resp), ICLASS_READER_TIMEOUT_UPDATE, &eof_time) == 10) {
|
||||
|
|
|
@ -1869,7 +1869,7 @@ void DirectTag15693Command(uint32_t datalen, uint32_t speed, uint32_t recv, uint
|
|||
}
|
||||
|
||||
if (recv) {
|
||||
recvlen = MIN(recvlen,ISO15693_MAX_RESPONSE_LENGTH);
|
||||
recvlen = MIN(recvlen, ISO15693_MAX_RESPONSE_LENGTH);
|
||||
reply_mix(CMD_ACK, recvlen, 0, 0, recvbuf, recvlen);
|
||||
} else {
|
||||
reply_mix(CMD_ACK, 1, 0, 0, NULL, 0);
|
||||
|
|
|
@ -2752,15 +2752,15 @@ void MifareU_Counter_Tearoff(uint8_t counter, uint32_t tearoff_time) {
|
|||
|
||||
// Send MFU counter increase cmd
|
||||
uint8_t cmd[] = {
|
||||
MIFARE_ULEV1_INCR_CNT,
|
||||
counter,
|
||||
0, // lsb
|
||||
0,
|
||||
0, // msb
|
||||
0, // rfu
|
||||
0,
|
||||
0,
|
||||
};
|
||||
MIFARE_ULEV1_INCR_CNT,
|
||||
counter,
|
||||
0, // lsb
|
||||
0,
|
||||
0, // msb
|
||||
0, // rfu
|
||||
0,
|
||||
0,
|
||||
};
|
||||
AddCrc14A(cmd, sizeof(cmd) - 2);
|
||||
|
||||
// anticollision / select card
|
||||
|
|
|
@ -216,7 +216,7 @@ int CLIParamHexToBuf(struct arg_str *argstr, uint8_t *data, int maxdatalen, int
|
|||
return res;
|
||||
}
|
||||
|
||||
res = param_gethex_to_eol((char*)tmpstr, 0, data, maxdatalen, datalen);
|
||||
res = param_gethex_to_eol((char *)tmpstr, 0, data, maxdatalen, datalen);
|
||||
switch (res) {
|
||||
case 1:
|
||||
printf("Parameter error: Invalid HEX value\n");
|
||||
|
@ -244,7 +244,7 @@ int CLIParamStrToBuf(struct arg_str *argstr, uint8_t *data, int maxdatalen, int
|
|||
|
||||
int len = strlen(argstr->sval[i]);
|
||||
|
||||
if (len > ( (sizeof(tmpstr) / 2 ) - ibuf)) {
|
||||
if (len > ((sizeof(tmpstr) / 2) - ibuf)) {
|
||||
printf("Parameter error: string too long (%i chars), expect MAX %zu chars\n", len + ibuf, (sizeof(tmpstr) / 2));
|
||||
fflush(stdout);
|
||||
return 2;
|
||||
|
|
|
@ -734,7 +734,7 @@ static int CmdHF15Demod(const char *Cmd) {
|
|||
PrintAndLogEx(INFO, " mask = %02x", mask);
|
||||
}
|
||||
|
||||
if ( k == 0 ) {
|
||||
if (k == 0) {
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -744,7 +744,7 @@ static int CmdHF15Demod(const char *Cmd) {
|
|||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(SUCCESS, " idx | data");
|
||||
PrintAndLogEx(SUCCESS, "-----+-------------------------------------------------");
|
||||
if ( k / 16 > 0) {
|
||||
if (k / 16 > 0) {
|
||||
for (; i < k; i += 16) {
|
||||
PrintAndLogEx(SUCCESS, " %3i | %s", i, sprint_hex(outBuf + i, 16));
|
||||
}
|
||||
|
|
|
@ -427,7 +427,7 @@ static void fuse_config(const picopass_hdr *hdr) {
|
|||
|
||||
uint16_t otp = (hdr->conf.otp[1] << 8 | hdr->conf.otp[0]);
|
||||
|
||||
PrintAndLogEx(INFO, " Raw: " _YELLOW_("%s"), sprint_hex((uint8_t*)&hdr->conf, 8));
|
||||
PrintAndLogEx(INFO, " Raw: " _YELLOW_("%s"), sprint_hex((uint8_t *)&hdr->conf, 8));
|
||||
PrintAndLogEx(INFO, " " _YELLOW_("%02X") "..................... app limit", hdr->conf.app_limit);
|
||||
PrintAndLogEx(INFO, " " _YELLOW_("%04X") " ( %5u )...... OTP", otp, otp);
|
||||
PrintAndLogEx(INFO, " " _YELLOW_("%02X") "............ block write lock", hdr->conf.block_writelock);
|
||||
|
@ -1882,13 +1882,13 @@ static int CmdHFiClass_WriteBlock(const char *Cmd) {
|
|||
rawkey = true;
|
||||
cmdp++;
|
||||
break;
|
||||
/*
|
||||
case 'n':
|
||||
PrintAndLogEx(SUCCESS, "Using " _YELLOW_("replay NR/MAC mode"));
|
||||
use_replay = true;
|
||||
cmdp++;
|
||||
break;
|
||||
*/
|
||||
/*
|
||||
case 'n':
|
||||
PrintAndLogEx(SUCCESS, "Using " _YELLOW_("replay NR/MAC mode"));
|
||||
use_replay = true;
|
||||
cmdp++;
|
||||
break;
|
||||
*/
|
||||
case 'v':
|
||||
verbose = true;
|
||||
cmdp++;
|
||||
|
@ -1910,7 +1910,7 @@ static int CmdHFiClass_WriteBlock(const char *Cmd) {
|
|||
if (errors || cmdp < 6) return usage_hf_iclass_writeblock();
|
||||
|
||||
int isok = iclass_write_block(blockno, bldata, KEY, use_credit_key, elite, rawkey, use_replay, verbose);
|
||||
switch(isok) {
|
||||
switch (isok) {
|
||||
case PM3_SUCCESS:
|
||||
PrintAndLogEx(SUCCESS, "Wrote block %02X successful", blockno);
|
||||
break;
|
||||
|
@ -2043,23 +2043,23 @@ static int CmdHFiClassRestore(const char *Cmd) {
|
|||
return PM3_EFILE;
|
||||
}
|
||||
|
||||
if (bytes_read < ((endblock - startblock + 1) * 8 )) {
|
||||
if (bytes_read < ((endblock - startblock + 1) * 8)) {
|
||||
PrintAndLogEx(ERR, "file is smaller than your suggested block range ( " _RED_("0x%02x..0x%02x")" )",
|
||||
startblock, endblock
|
||||
);
|
||||
startblock, endblock
|
||||
);
|
||||
free(dump);
|
||||
return PM3_EFILE;
|
||||
}
|
||||
|
||||
iclass_restore_req_t *payload = calloc(1, payload_size);
|
||||
payload->req.use_raw = rawkey,
|
||||
payload->req.use_elite = elite,
|
||||
payload->req.use_credit_key = use_credit_key,
|
||||
payload->req.use_replay = false,
|
||||
payload->req.blockno = startblock,
|
||||
payload->req.send_reply = true,
|
||||
payload->req.do_auth = true,
|
||||
memcpy(payload->req.key, KEY, 8);
|
||||
payload->req.use_elite = elite,
|
||||
payload->req.use_credit_key = use_credit_key,
|
||||
payload->req.use_replay = false,
|
||||
payload->req.blockno = startblock,
|
||||
payload->req.send_reply = true,
|
||||
payload->req.do_auth = true,
|
||||
memcpy(payload->req.key, KEY, 8);
|
||||
|
||||
payload->item_cnt = (endblock - startblock + 1);
|
||||
|
||||
|
@ -2070,7 +2070,7 @@ static int CmdHFiClassRestore(const char *Cmd) {
|
|||
|
||||
for (uint8_t i = 0; i < payload->item_cnt; i++) {
|
||||
payload->blocks[i].blockno = startblock + i;
|
||||
memcpy(payload->blocks[i].data, dump + (startblock * 8) + (i * 8) , sizeof(payload->blocks[i].data));
|
||||
memcpy(payload->blocks[i].data, dump + (startblock * 8) + (i * 8), sizeof(payload->blocks[i].data));
|
||||
}
|
||||
|
||||
free(dump);
|
||||
|
@ -2979,7 +2979,7 @@ static int CmdHFiClassCheckKeys(const char *Cmd) {
|
|||
return res;
|
||||
}
|
||||
|
||||
// Get CSN / UID and CCNR
|
||||
// Get CSN / UID and CCNR
|
||||
PrintAndLogEx(SUCCESS, "Reading tag CSN / CCNR...");
|
||||
for (uint8_t i = 0; i < ICLASS_AUTH_RETRY && !got_csn; i++) {
|
||||
got_csn = select_only(CSN, CCNR, false);
|
||||
|
|
|
@ -66,7 +66,7 @@ int demodDestron(bool verbose) {
|
|||
|
||||
uint8_t data[5] = {0};
|
||||
uint8_t parity_err = 0;
|
||||
for (int i=0; i < sizeof(data); i++) {
|
||||
for (int i = 0; i < sizeof(data); i++) {
|
||||
data[i] = bytebits_to_byte(bits + i * 8, 8);
|
||||
parity_err += oddparity8(data[i]);
|
||||
data[i] &= 0x7F;
|
||||
|
@ -113,11 +113,11 @@ static int CmdDestronClone(const char *Cmd) {
|
|||
CLIParserFree(ctx);
|
||||
|
||||
uint8_t data_ex[12 + 24] = {0}; // ManchesterEncode need extra room
|
||||
for (int i=0; i < datalen; i++) {
|
||||
for (int i = 0; i < datalen; i++) {
|
||||
data_ex[i + 1] = ~data [i] | (evenparity8(data[i]) << 7);
|
||||
}
|
||||
for (int i=0; i < 3; i++) {
|
||||
blocks[i+1] = manchesterEncode2Bytes((data_ex[i*2]<<8)+data_ex[i*2+1]);
|
||||
for (int i = 0; i < 3; i++) {
|
||||
blocks[i + 1] = manchesterEncode2Bytes((data_ex[i * 2] << 8) + data_ex[i * 2 + 1]);
|
||||
}
|
||||
// inject preamble
|
||||
blocks[1] = (blocks[1] & 0xFFFF) | 0xAAE20000;
|
||||
|
|
|
@ -107,7 +107,7 @@ typedef enum {
|
|||
// 2 = EM4x05
|
||||
static em_tech_type_t em_get_card_type(uint32_t config) {
|
||||
uint8_t t = (config >> 1) & 0xF;
|
||||
switch(t) {
|
||||
switch (t) {
|
||||
case 4:
|
||||
return EM_4X69;
|
||||
case 8:
|
||||
|
@ -118,7 +118,7 @@ static em_tech_type_t em_get_card_type(uint32_t config) {
|
|||
return EM_UNKNOWN;
|
||||
}
|
||||
|
||||
static const char* em_get_card_str(uint32_t config) {
|
||||
static const char *em_get_card_str(uint32_t config) {
|
||||
switch (em_get_card_type(config)) {
|
||||
case EM_4305:
|
||||
return "EM4305";
|
||||
|
@ -497,7 +497,7 @@ int CmdEM4x05Dump(const char *Cmd) {
|
|||
PrintAndLogEx(INFO, "Addr | data | ascii |lck| info");
|
||||
PrintAndLogEx(INFO, "-----+----------+-------+---+-----");
|
||||
|
||||
if ( card_type == EM_4205 || card_type == EM_4305 || card_type == EM_UNKNOWN) {
|
||||
if (card_type == EM_4205 || card_type == EM_4305 || card_type == EM_UNKNOWN) {
|
||||
|
||||
|
||||
// To flag any blocks locked we need to read blocks 14 and 15 first
|
||||
|
@ -622,7 +622,7 @@ int CmdEM4x05Dump(const char *Cmd) {
|
|||
// saveFile (binary) passes in the .bin extension.
|
||||
if (strcmp(filename, "") == 0) {
|
||||
|
||||
if ( card_type == EM_4X69) {
|
||||
if (card_type == EM_4X69) {
|
||||
sprintf(filename, "lf-4x69-%08X-dump", BSWAP_32(data[1]));
|
||||
} else {
|
||||
sprintf(filename, "lf-4x05-%08X-dump", BSWAP_32(data[1]));
|
||||
|
@ -1059,7 +1059,7 @@ int CmdEM4x05Info(const char *Cmd) {
|
|||
}
|
||||
}
|
||||
} else if (card_type == EM_4X69) {
|
||||
// read word 3 to see which is being used for the protection bits
|
||||
// read word 3 to see which is being used for the protection bits
|
||||
if (EM4x05ReadWord_ext(EM4469_PROT_BLOCK, pwd, usePwd, &word) != PM3_SUCCESS) {
|
||||
return PM3_ESOFT;
|
||||
}
|
||||
|
@ -1109,7 +1109,7 @@ int CmdEM4x05Chk(const char *Cmd) {
|
|||
uint64_t t1 = msclock();
|
||||
|
||||
// White cloner password based on EM4100 ID
|
||||
if ( card_id > 0 ) {
|
||||
if (card_id > 0) {
|
||||
|
||||
uint32_t pwd = lf_t55xx_white_pwdgen(card_id & 0xFFFFFFFF);
|
||||
PrintAndLogEx(INFO, "testing %08"PRIX32" generated ", pwd);
|
||||
|
@ -1227,11 +1227,11 @@ static void unlock_add_item(em4x05_unlock_item_t *array, uint8_t len, uint32_t v
|
|||
|
||||
uint8_t i = 0;
|
||||
for (; i < len; i++) {
|
||||
if ( array[i].value == value ) {
|
||||
if (array[i].value == value) {
|
||||
array[i].cnt++;
|
||||
break;
|
||||
}
|
||||
if ( array[i].cnt == 0 ) {
|
||||
if (array[i].cnt == 0) {
|
||||
array[i].cnt++;
|
||||
array[i].value = value;
|
||||
break;
|
||||
|
@ -1266,7 +1266,7 @@ int CmdEM4x05Unlock(const char *Cmd) {
|
|||
bool verbose = arg_get_lit(ctx, 5);
|
||||
CLIParserFree(ctx);
|
||||
|
||||
if ( start > end ) {
|
||||
if (start > end) {
|
||||
PrintAndLogEx(FAILED, "start delay can\'t be larger than end delay %.0lf vs %.0lf", start, end);
|
||||
return PM3_EINVARG;
|
||||
}
|
||||
|
@ -1357,7 +1357,7 @@ int CmdEM4x05Unlock(const char *Cmd) {
|
|||
uint32_t soon = 0;
|
||||
uint32_t late = 0;
|
||||
|
||||
em4x05_unlock_item_t flipped[64] ={{0,0}};
|
||||
em4x05_unlock_item_t flipped[64] = {{0, 0}};
|
||||
|
||||
//
|
||||
// main loop
|
||||
|
@ -1406,7 +1406,7 @@ int CmdEM4x05Unlock(const char *Cmd) {
|
|||
.off = false
|
||||
};
|
||||
res = handle_tearoff(¶ms, verbose);
|
||||
if ( res != PM3_SUCCESS ) {
|
||||
if (res != PM3_SUCCESS) {
|
||||
PrintAndLogEx(WARNING, "failed to configure tear off");
|
||||
return PM3_ESOFT;
|
||||
}
|
||||
|
@ -1431,7 +1431,7 @@ int CmdEM4x05Unlock(const char *Cmd) {
|
|||
if (verbose)
|
||||
PrintAndLogEx(INFO, "ref:%08X 14:%08X 15:%08X ", search_value, word14, word15);
|
||||
|
||||
if ( word14 == search_value && word15 == 0) {
|
||||
if (word14 == search_value && word15 == 0) {
|
||||
PrintAndLogEx(INFO, "Status: Nothing happened => " _GREEN_("tearing too soon"));
|
||||
|
||||
if (my_auto) {
|
||||
|
@ -1448,7 +1448,7 @@ int CmdEM4x05Unlock(const char *Cmd) {
|
|||
if (word14 == 0) {
|
||||
PrintAndLogEx(INFO, "Status: Protect succeeded => " _GREEN_("tearing too late"));
|
||||
} else {
|
||||
if ( word14 == search_value) {
|
||||
if (word14 == search_value) {
|
||||
PrintAndLogEx(INFO, "Status: 15 ok, 14 not yet erased => " _GREEN_("tearing too late"));
|
||||
} else {
|
||||
PrintAndLogEx(INFO, "Status: 15 ok, 14 partially erased => " _GREEN_("tearing too late"));
|
||||
|
@ -1498,7 +1498,7 @@ int CmdEM4x05Unlock(const char *Cmd) {
|
|||
|
||||
} else {
|
||||
|
||||
if (( word15 & ACTIVE_MASK) == ACTIVE_MASK) {
|
||||
if ((word15 & ACTIVE_MASK) == ACTIVE_MASK) {
|
||||
|
||||
PrintAndLogEx(INFO, "Status: 15 bitflipped and active => " _RED_("SUCCESS?: ") "14: %08X 15: " _CYAN_("%08X"), word14, word15);
|
||||
PrintAndLogEx(INFO, "Committing results...");
|
||||
|
@ -1507,13 +1507,13 @@ int CmdEM4x05Unlock(const char *Cmd) {
|
|||
|
||||
// read after reset
|
||||
res = EM4x05ReadWord_ext(14, pwd, use_pwd, &word14b);
|
||||
if ( res != PM3_SUCCESS ) {
|
||||
if (res != PM3_SUCCESS) {
|
||||
PrintAndLogEx(WARNING, "failed to read 14");
|
||||
return PM3_ESOFT;
|
||||
}
|
||||
|
||||
res = EM4x05ReadWord_ext(15, pwd, use_pwd, &word15b);
|
||||
if ( res != PM3_SUCCESS ) {
|
||||
if (res != PM3_SUCCESS) {
|
||||
PrintAndLogEx(WARNING, "failed to read 15");
|
||||
return PM3_ESOFT;
|
||||
}
|
||||
|
@ -1571,8 +1571,8 @@ int CmdEM4x05Unlock(const char *Cmd) {
|
|||
uint32_t bitflips = search_value ^ word14b;
|
||||
PrintAndLogEx(INFO, "Old protection word => " _YELLOW_("%08X"), search_value);
|
||||
char bitstring[9] = {0};
|
||||
for (int i=0; i < 8; i++) {
|
||||
bitstring[i] = bitflips & (0xF << ((7-i) * 4)) ? 'x' : '.';
|
||||
for (int i = 0; i < 8; i++) {
|
||||
bitstring[i] = bitflips & (0xF << ((7 - i) * 4)) ? 'x' : '.';
|
||||
}
|
||||
// compute number of bits flipped
|
||||
|
||||
|
|
|
@ -470,7 +470,7 @@ const fdxbCountryMapping_t fdxbCountryMapping[] = {
|
|||
{ 0, "N/A" } // must be the last entry
|
||||
};
|
||||
|
||||
static const char* mapFDBX(uint16_t countryCode) {
|
||||
static const char *mapFDBX(uint16_t countryCode) {
|
||||
uint16_t i = 0;
|
||||
while (fdxbCountryMapping[i].code > 0) {
|
||||
if (countryCode == fdxbCountryMapping[i].code) {
|
||||
|
@ -572,8 +572,8 @@ int demodFDXB(bool verbose) {
|
|||
PrintAndLogEx(SUCCESS, " Animal bit set? %s", animalBit ? _YELLOW_("True") : "False");
|
||||
PrintAndLogEx(SUCCESS, " Data block? %s [value 0x%X]", dataBlockBit ? _YELLOW_("True") : "False", extended);
|
||||
PrintAndLogEx(SUCCESS, " RUDI bit? %s", rudiBit ? _YELLOW_("True") " (advanced transponder)" : "False");
|
||||
PrintAndLogEx(SUCCESS, " User Info? %u %s", userInfo, userInfo == 0 ? "(RFU)":"");
|
||||
PrintAndLogEx(SUCCESS, " Replacement No? %u %s", replacementNr, replacementNr == 0 ? "(RFU)":"");
|
||||
PrintAndLogEx(SUCCESS, " User Info? %u %s", userInfo, userInfo == 0 ? "(RFU)" : "");
|
||||
PrintAndLogEx(SUCCESS, " Replacement No? %u %s", replacementNr, replacementNr == 0 ? "(RFU)" : "");
|
||||
|
||||
uint8_t c[] = {0, 0};
|
||||
compute_crc(CRC_11784, raw, sizeof(raw), &c[0], &c[1]);
|
||||
|
|
|
@ -1106,7 +1106,7 @@ static int l_em4x05_read(lua_State *L) {
|
|||
|
||||
// get password
|
||||
const char *p_pwd = luaL_checkstring(L, 2);
|
||||
if (p_pwd == NULL || strlen(p_pwd) == 0 ) {
|
||||
if (p_pwd == NULL || strlen(p_pwd) == 0) {
|
||||
use_pwd = false;
|
||||
} else {
|
||||
if (strlen(p_pwd) != 8)
|
||||
|
@ -1181,11 +1181,11 @@ static int l_em4x50_read(lua_State *L) {
|
|||
}
|
||||
|
||||
uint32_t word = (
|
||||
words[etd.address].byte[0] << 24 |
|
||||
words[etd.address].byte[1] << 16 |
|
||||
words[etd.address].byte[2] << 8 |
|
||||
words[etd.address].byte[3]
|
||||
);
|
||||
words[etd.address].byte[0] << 24 |
|
||||
words[etd.address].byte[1] << 16 |
|
||||
words[etd.address].byte[2] << 8 |
|
||||
words[etd.address].byte[3]
|
||||
);
|
||||
lua_pushinteger(L, word);
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -177,13 +177,13 @@ Check column "offline" for their availability.
|
|||
|`hf 15 info `|N |`Tag information`
|
||||
|`hf 15 sniff `|N |`Sniff ISO15693 traffic`
|
||||
|`hf 15 raw `|N |`Send raw hex data to tag`
|
||||
|`hf 15 read `|N |`Read a block`
|
||||
|`hf 15 rdbl `|N |`Read a block`
|
||||
|`hf 15 reader `|N |`Act like an ISO15693 reader`
|
||||
|`hf 15 readmulti `|N |`Reads multiple Blocks`
|
||||
|`hf 15 restore `|N |`Restore from file to all memory pages of an ISO15693 tag`
|
||||
|`hf 15 samples `|N |`Acquire Samples as Reader (enables carrier, sends inquiry)`
|
||||
|`hf 15 sim `|N |`Fake an ISO15693 tag`
|
||||
|`hf 15 write `|N |`Write a block`
|
||||
|`hf 15 wrbl `|N |`Write a block`
|
||||
|`hf 15 findafi `|N |`Brute force AFI of an ISO15693 tag`
|
||||
|`hf 15 writeafi `|N |`Writes the AFI on an ISO15693 tag`
|
||||
|`hf 15 writedsfid `|N |`Writes the DSFID on an ISO15693 tag`
|
||||
|
@ -233,7 +233,7 @@ Check column "offline" for their availability.
|
|||
|command |offline |description
|
||||
|------- |------- |-----------
|
||||
|`hf fido help `|Y |`This help.`
|
||||
|`hf fido info `|N |`List ISO 14443A history`
|
||||
|`hf fido list `|N |`List ISO 14443A history`
|
||||
|`hf fido info `|N |`Info about FIDO tag.`
|
||||
|`hf fido reg `|N |`FIDO U2F Registration Message.`
|
||||
|`hf fido auth `|N |`FIDO U2F Authentication Message.`
|
||||
|
@ -256,10 +256,10 @@ Check column "offline" for their availability.
|
|||
|`hf iclass restore `|N |`[options..] Restore a dump file onto a Picopass / iCLASS tag`
|
||||
|`hf iclass sniff `|N |` Eavesdrop Picopass / iCLASS communication`
|
||||
|`hf iclass wrbl `|N |`[options..] Write Picopass / iCLASS block`
|
||||
|`hf iclass chk `|Y |`[options..] Check keys`
|
||||
|`hf iclass autopwn `|N |`[options..] Automatic key recovery tool for iCLASS`
|
||||
|`hf iclass chk `|N |`[options..] Check keys`
|
||||
|`hf iclass loclass `|Y |`[options..] Use loclass to perform bruteforce reader attack`
|
||||
|`hf iclass lookup `|Y |`[options..] Uses authentication trace to check for key in dictionary file`
|
||||
|`hf iclass replay `|N |`<mac> Read Picopass / iCLASS tag via replay attack`
|
||||
|`hf iclass sim `|N |`[options..] Simulate iCLASS tag`
|
||||
|`hf iclass eload `|N |`[f <fn> ] Load Picopass / iCLASS dump file into emulator memory`
|
||||
|`hf iclass esave `|N |`[f <fn> ] Save emulator memory to file`
|
||||
|
@ -556,6 +556,19 @@ Check column "offline" for their availability.
|
|||
|`lf cotag read `|N |`Attempt to read and extract tag data`
|
||||
|
||||
|
||||
### lf destron
|
||||
|
||||
{ FDX-A Destron RFIDs... }
|
||||
|
||||
|command |offline |description
|
||||
|------- |------- |-----------
|
||||
|`lf destron help `|Y |`This help`
|
||||
|`lf destron demod `|Y |`Demodulate an Destron tag from the GraphBuffer`
|
||||
|`lf destron read `|N |`Attempt to read and extract tag data from the antenna`
|
||||
|`lf destron clone `|N |`Clone Destron tag to T55x7`
|
||||
|`lf destron sim `|N |`Simulate Destron tag`
|
||||
|
||||
|
||||
### lf em
|
||||
|
||||
{ EM4X CHIPs & RFIDs... }
|
||||
|
@ -570,12 +583,14 @@ Check column "offline" for their availability.
|
|||
|`lf em 410x_watch `|N |`watches for EM410x 125/134 kHz tags (option 'h' for 134)`
|
||||
|`lf em 410x_spoof `|N |`watches for EM410x 125/134 kHz tags, and replays them. (option 'h' for 134)`
|
||||
|`lf em 410x_clone `|N |`write EM410x UID to T55x7 or Q5/T5555 tag`
|
||||
|`lf em 4x05_chk `|N |`Check passwords from dictionary`
|
||||
|`lf em 4x05_demod `|Y |`demodulate a EM4x05/EM4x69 tag from the GraphBuffer`
|
||||
|`lf em 4x05_dump `|N |`dump EM4x05/EM4x69 tag`
|
||||
|`lf em 4x05_wipe `|N |`wipe EM4x05/EM4x69 tag`
|
||||
|`lf em 4x05_info `|N |`tag information EM4x05/EM4x69`
|
||||
|`lf em 4x05_read `|N |`read word data from EM4x05/EM4x69`
|
||||
|`lf em 4x05_write `|N |`write word data to EM4x05/EM4x69`
|
||||
|`lf em 4x05_unlock `|N |`execute tear off against EM4x05/EM4x69`
|
||||
|`lf em 4x50_dump `|N |`dump EM4x50 tag`
|
||||
|`lf em 4x50_info `|N |`tag information EM4x50`
|
||||
|`lf em 4x50_write `|N |`write word data to EM4x50`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue