mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-09-20 07:16:14 +08:00
text
This commit is contained in:
parent
a636d97551
commit
9ebe5ae8dd
|
@ -1052,7 +1052,7 @@ int SelectCard14443A_4_WithParameters(bool disconnect, bool verbose, iso14a_card
|
|||
}
|
||||
|
||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 1500) == false) {
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
|
@ -1079,7 +1079,7 @@ int SelectCard14443A_4_WithParameters(bool disconnect, bool verbose, iso14a_card
|
|||
uint8_t rats[] = { 0xE0, 0x80 }; // FSDI=8 (FSD=256), CID=0
|
||||
SendCommandMIX(CMD_HF_ISO14443A_READER, ISO14A_RAW | ISO14A_APPEND_CRC | ISO14A_NO_DISCONNECT, sizeof(rats), 0, rats, sizeof(rats));
|
||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 1500) == false) {
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
|
@ -2084,13 +2084,10 @@ int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search) {
|
|||
return select_status;
|
||||
}
|
||||
|
||||
if (verbose) {
|
||||
PrintAndLogEx(INFO, "--- " _CYAN_("ISO14443-a Information") "---------------------");
|
||||
}
|
||||
|
||||
PrintAndLogEx(INFO, "---------- " _CYAN_("ISO14443-A Information") " ----------");
|
||||
PrintAndLogEx(SUCCESS, " UID: " _GREEN_("%s") " %s", sprint_hex(card.uid, card.uidlen), get_uid_type(&card));
|
||||
PrintAndLogEx(SUCCESS, "ATQA: " _GREEN_("%02X %02X"), card.atqa[1], card.atqa[0]);
|
||||
PrintAndLogEx(SUCCESS, " SAK: " _GREEN_("%02X [%" PRIu64 "]"), card.sak, resp.oldarg[0]);
|
||||
PrintAndLogEx(SUCCESS, " SAK: " _GREEN_("%02X [%" PRIu64 "]"), card.sak, select_status);
|
||||
|
||||
bool isMifareMini = false;
|
||||
bool isMifareClassic = true;
|
||||
|
@ -2265,9 +2262,10 @@ int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search) {
|
|||
|
||||
memcpy(card.ats, resp.data.asBytes, resp.oldarg[0]);
|
||||
card.ats_len = resp.oldarg[0]; // note: ats_len includes CRC Bytes
|
||||
if (card.ats_len > 3)
|
||||
if (card.ats_len > 3) {
|
||||
select_status = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (card.ats_len >= 3) { // a valid ATS consists of at least the length byte (TL) and 2 CRC bytes
|
||||
|
||||
|
|
|
@ -320,7 +320,7 @@ static int CmdHFFudanDump(const char *Cmd) {
|
|||
}
|
||||
} else {
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(WARNING, "command execute timeout when trying to read block %2d", b);
|
||||
PrintAndLogEx(WARNING, "command execution time out when trying to read block %2d", b);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -404,7 +404,7 @@ static int CmdHFFudanWrBl(const char *Cmd) {
|
|||
|
||||
PacketResponseNG resp;
|
||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 1500) == false) {
|
||||
PrintAndLogEx(FAILED, "Command execute timeout");
|
||||
PrintAndLogEx(FAILED, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
|
|
|
@ -1776,7 +1776,7 @@ static bool select_only(uint8_t *CSN, uint8_t *CCNR, bool verbose, bool shallow_
|
|||
SendCommandNG(CMD_HF_ICLASS_READER, (uint8_t *)&payload, sizeof(iclass_card_select_t));
|
||||
|
||||
if (WaitForResponseTimeout(CMD_HF_ICLASS_READER, &resp, 2000) == false) {
|
||||
PrintAndLogEx(WARNING, "command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1942,7 +1942,7 @@ static int CmdHFiClassDump(const char *Cmd) {
|
|||
SendCommandNG(CMD_HF_ICLASS_READER, (uint8_t *)&payload_rdr, sizeof(iclass_card_select_t));
|
||||
|
||||
if (WaitForResponseTimeout(CMD_HF_ICLASS_READER, &resp, 2000) == false) {
|
||||
PrintAndLogEx(WARNING, "command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
DropField();
|
||||
return PM3_ESOFT;
|
||||
}
|
||||
|
@ -2208,7 +2208,7 @@ static int iclass_write_block(uint8_t blockno, uint8_t *bldata, uint8_t *macdata
|
|||
PacketResponseNG resp;
|
||||
|
||||
if (WaitForResponseTimeout(CMD_HF_ICLASS_WRITEBL, &resp, 2000) == 0) {
|
||||
if (verbose) PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
if (verbose) PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
|
@ -2434,7 +2434,7 @@ static int CmdHFiClassCreditEpurse(const char *Cmd) {
|
|||
|
||||
int isok;
|
||||
if (WaitForResponseTimeout(CMD_HF_ICLASS_CREDIT_EPURSE, &resp, 2000) == 0) {
|
||||
if (verbose) PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
if (verbose) PrintAndLogEx(WARNING, "command execution time out");
|
||||
isok = PM3_ETIMEOUT;
|
||||
} else if (resp.status != PM3_SUCCESS) {
|
||||
if (verbose) PrintAndLogEx(ERR, "failed to communicate with card");
|
||||
|
@ -2616,7 +2616,7 @@ static int CmdHFiClassRestore(const char *Cmd) {
|
|||
SendCommandNG(CMD_HF_ICLASS_RESTORE, (uint8_t *)payload, payload_size);
|
||||
|
||||
if (WaitForResponseTimeout(CMD_HF_ICLASS_RESTORE, &resp, 2500) == 0) {
|
||||
PrintAndLogEx(WARNING, "command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
DropField();
|
||||
free(payload);
|
||||
return PM3_ETIMEOUT;
|
||||
|
@ -2652,7 +2652,7 @@ static int iclass_read_block(uint8_t *KEY, uint8_t blockno, uint8_t keyType, boo
|
|||
SendCommandNG(CMD_HF_ICLASS_READBL, (uint8_t *)&payload, sizeof(payload));
|
||||
|
||||
if (WaitForResponseTimeout(CMD_HF_ICLASS_READBL, &resp, 2000) == false) {
|
||||
if (verbose) PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
if (verbose) PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
|
@ -3759,7 +3759,7 @@ static int CmdHFiClassCheckKeys(const char *Cmd) {
|
|||
timeout++;
|
||||
PrintAndLogEx(NORMAL, "." NOLF);
|
||||
if (timeout > 10) {
|
||||
PrintAndLogEx(WARNING, "\ncommand execute timeout, aborting...");
|
||||
PrintAndLogEx(WARNING, "\ncommand execution time out, aborting...");
|
||||
goto out;
|
||||
}
|
||||
looped = true;
|
||||
|
@ -4618,7 +4618,7 @@ static int CmdHFiClassEncode(const char *Cmd) {
|
|||
uint8_t key[8] = {0};
|
||||
|
||||
// If we use emulator memory skip key requirement
|
||||
if (!use_emulator_memory) {
|
||||
if (use_emulator_memory == false) {
|
||||
if (key_nr < 0) {
|
||||
PrintAndLogEx(ERR, "Missing required arg for --ki or --emu");
|
||||
return PM3_EINVARG;
|
||||
|
|
|
@ -661,7 +661,7 @@ static int CmdHF14AJookiClone(const char *Cmd) {
|
|||
uint8_t isOK = resp.oldarg[0] & 0xff;
|
||||
PrintAndLogEx(SUCCESS, "Write block %d ( %s )", blockno, isOK ? _GREEN_("ok") : _RED_("fail"));
|
||||
} else {
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
}
|
||||
|
||||
blockno++;
|
||||
|
|
|
@ -504,7 +504,7 @@ static bool mf_write_block(const uint8_t *key, uint8_t keytype, uint8_t blockno,
|
|||
SendCommandMIX(CMD_HF_MIFARE_WRITEBL, blockno, keytype, 0, data, sizeof(data));
|
||||
PacketResponseNG resp;
|
||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 1500) == false) {
|
||||
PrintAndLogEx(FAILED, "Command execute timeout");
|
||||
PrintAndLogEx(FAILED, "command execution time out");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1028,7 +1028,7 @@ static int CmdHF14AMfWrBl(const char *Cmd) {
|
|||
|
||||
PacketResponseNG resp;
|
||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 1500) == false) {
|
||||
PrintAndLogEx(FAILED, "Command execute timeout");
|
||||
PrintAndLogEx(FAILED, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
|
@ -1221,7 +1221,7 @@ static int FastDumpWithEcFill(uint8_t numsectors) {
|
|||
PacketResponseNG resp;
|
||||
bool res = WaitForResponseTimeout(CMD_HF_MIFARE_EML_LOAD, &resp, 2500);
|
||||
if (res == false) {
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
|
@ -1235,7 +1235,7 @@ static int FastDumpWithEcFill(uint8_t numsectors) {
|
|||
SendCommandNG(CMD_HF_MIFARE_EML_LOAD, (uint8_t *)&payload, sizeof(payload));
|
||||
res = WaitForResponseTimeout(CMD_HF_MIFARE_EML_LOAD, &resp, 2500);
|
||||
if (res == false) {
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
setDeviceDebugLevel(dbg_curr, false);
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
@ -1595,7 +1595,7 @@ static int CmdHF14AMfRestore(const char *Cmd) {
|
|||
SendCommandMIX(CMD_HF_MIFARE_WRITEBL, blockno, kt, 0, wdata, sizeof(wdata));
|
||||
PacketResponseNG resp;
|
||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 1500) == false) {
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1792,7 +1792,7 @@ static int CmdHF14AMfNested(const char *Cmd) { //TODO: single mode broken? can't
|
|||
int16_t isOK = mfnested(blockNo, keyType, key, trgBlockNo, trgKeyType, keyBlock, !ignore_static_encrypted);
|
||||
switch (isOK) {
|
||||
case PM3_ETIMEOUT:
|
||||
PrintAndLogEx(ERR, "Command execute timeout\n");
|
||||
PrintAndLogEx(ERR, "command execution time out\n");
|
||||
break;
|
||||
case PM3_EOPABORTED:
|
||||
PrintAndLogEx(WARNING, "Button pressed. Aborted\n");
|
||||
|
@ -1875,7 +1875,7 @@ static int CmdHF14AMfNested(const char *Cmd) { //TODO: single mode broken? can't
|
|||
int16_t isOK = mfnested(blockNo, keyType, key, mfFirstBlockOfSector(sectorNo), trgKeyType, keyBlock, calibrate);
|
||||
switch (isOK) {
|
||||
case PM3_ETIMEOUT:
|
||||
PrintAndLogEx(ERR, "Command execute timeout\n");
|
||||
PrintAndLogEx(ERR, "command execution time out\n");
|
||||
break;
|
||||
case PM3_EOPABORTED:
|
||||
PrintAndLogEx(WARNING, "button pressed. Aborted\n");
|
||||
|
@ -2135,7 +2135,7 @@ static int CmdHF14AMfNestedStatic(const char *Cmd) {
|
|||
int16_t isOK = mfStaticNested(blockNo, keyType, key, mfFirstBlockOfSector(sectorNo), trgKeyType, keyBlock);
|
||||
switch (isOK) {
|
||||
case PM3_ETIMEOUT :
|
||||
PrintAndLogEx(ERR, "Command execute timeout");
|
||||
PrintAndLogEx(ERR, "command execution time out");
|
||||
break;
|
||||
case PM3_EOPABORTED :
|
||||
PrintAndLogEx(WARNING, "aborted via keyboard.");
|
||||
|
@ -5896,7 +5896,7 @@ static int CmdHf14AMfSetMod(const char *Cmd) {
|
|||
SendCommandNG(CMD_HF_MIFARE_SETMOD, data, sizeof(data));
|
||||
PacketResponseNG resp;
|
||||
if (WaitForResponseTimeout(CMD_HF_MIFARE_SETMOD, &resp, 1500) == false) {
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
|
@ -7678,7 +7678,7 @@ static int CmdHF14AMfWipe(const char *Cmd) {
|
|||
PrintAndLogEx(NORMAL, "- key %c ( " _RED_("fail") " )", (kt == MF_KEY_A) ? 'A' : 'B');
|
||||
}
|
||||
} else {
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8835,7 +8835,7 @@ static int CmdHF14AGen4_GDM_Cfg(const char *Cmd) {
|
|||
SendCommandNG(CMD_HF_MIFARE_READBL_EX, (uint8_t *)&payload, sizeof(payload));
|
||||
PacketResponseNG resp;
|
||||
if (WaitForResponseTimeout(CMD_HF_MIFARE_READBL_EX, &resp, 1500) == false) {
|
||||
PrintAndLogEx(WARNING, "command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
|
@ -8916,7 +8916,7 @@ static int CmdHF14AGen4_GDM_SetCfg(const char *Cmd) {
|
|||
SendCommandNG(CMD_HF_MIFARE_WRITEBL_EX, (uint8_t *)&payload, sizeof(payload));
|
||||
PacketResponseNG resp;
|
||||
if (WaitForResponseTimeout(CMD_HF_MIFARE_WRITEBL_EX, &resp, 1500) == false) {
|
||||
PrintAndLogEx(WARNING, "command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
|
@ -8999,7 +8999,7 @@ static int CmdHF14AGen4_GDM_SetBlk(const char *Cmd) {
|
|||
SendCommandNG(CMD_HF_MIFARE_G4_GDM_WRBL, (uint8_t *)&payload, sizeof(payload));
|
||||
PacketResponseNG resp;
|
||||
if (WaitForResponseTimeout(CMD_HF_MIFARE_G4_GDM_WRBL, &resp, 1500) == false) {
|
||||
PrintAndLogEx(WARNING, "command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
|
@ -9228,7 +9228,7 @@ static int CmdHF14AMfValue(const char *Cmd) {
|
|||
|
||||
PacketResponseNG resp;
|
||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 1500) == false) {
|
||||
PrintAndLogEx(FAILED, "Command execute timeout");
|
||||
PrintAndLogEx(FAILED, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
isok = resp.oldarg[0] & 0xff;
|
||||
|
@ -9253,7 +9253,7 @@ static int CmdHF14AMfValue(const char *Cmd) {
|
|||
|
||||
PacketResponseNG resp;
|
||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 1500) == false) {
|
||||
PrintAndLogEx(FAILED, "Command execute timeout");
|
||||
PrintAndLogEx(FAILED, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
|
@ -9673,40 +9673,40 @@ static int CmdHF14AMfInfo(const char *Cmd) {
|
|||
PrintAndLogEx(SUCCESS, "Static nonce......... " _YELLOW_("yes"));
|
||||
}
|
||||
|
||||
if (res == NONCE_FAIL) {
|
||||
PrintAndLogEx(SUCCESS, "nonce................ " _RED_("read failed"));
|
||||
}
|
||||
|
||||
if (res == NONCE_NORMAL) {
|
||||
// not static
|
||||
res = detect_classic_prng();
|
||||
if (res == 1)
|
||||
PrintAndLogEx(SUCCESS, "Prng................. " _GREEN_("weak"));
|
||||
else if (res == 0)
|
||||
PrintAndLogEx(SUCCESS, "Prng................. " _YELLOW_("hard"));
|
||||
else
|
||||
PrintAndLogEx(FAILED, "Prng................. " _RED_("fail"));
|
||||
|
||||
if (res == 1) {
|
||||
PrintAndLogEx(SUCCESS, "Prng....... " _GREEN_("weak"));
|
||||
} else if (res == 0) {
|
||||
PrintAndLogEx(SUCCESS, "Prng....... " _YELLOW_("hard"));
|
||||
} else {
|
||||
PrintAndLogEx(FAILED, "Prng........ " _RED_("fail"));
|
||||
}
|
||||
|
||||
// detect static encrypted nonce
|
||||
if (keylen == MIFARE_KEY_SIZE) {
|
||||
res = detect_classic_static_encrypted_nonce(blockn, keytype, key);
|
||||
if (res == NONCE_STATIC) {
|
||||
PrintAndLogEx(SUCCESS, "Static nonce......... " _YELLOW_("yes"));
|
||||
PrintAndLogEx(SUCCESS, "Static nonce... " _YELLOW_("yes"));
|
||||
fKeyType = 0xFF; // dont detect twice
|
||||
}
|
||||
if (res == NONCE_STATIC_ENC) {
|
||||
PrintAndLogEx(SUCCESS, "Static enc nonce..... " _RED_("yes"));
|
||||
PrintAndLogEx(SUCCESS, "Static enc nonce... " _RED_("yes"));
|
||||
fKeyType = 0xFF; // dont detect twice
|
||||
}
|
||||
}
|
||||
|
||||
if (fKeyType != 0xFF) {
|
||||
res = detect_classic_static_encrypted_nonce(0, fKeyType, fkey);
|
||||
if (res == NONCE_STATIC)
|
||||
PrintAndLogEx(SUCCESS, "Static nonce......... " _YELLOW_("yes"));
|
||||
if (res == NONCE_STATIC_ENC)
|
||||
PrintAndLogEx(SUCCESS, "Static enc nonce..... " _RED_("yes"));
|
||||
if (res == NONCE_STATIC) {
|
||||
PrintAndLogEx(SUCCESS, "Static nonce... " _YELLOW_("yes"));
|
||||
}
|
||||
|
||||
if (res == NONCE_STATIC_ENC) {
|
||||
PrintAndLogEx(SUCCESS, "Static enc nonce... " _RED_("yes"));
|
||||
}
|
||||
}
|
||||
|
||||
if (do_nack_test) {
|
||||
|
|
|
@ -404,7 +404,7 @@ static int mfdes_get_info(mfdes_info_res_t *info) {
|
|||
PacketResponseNG resp;
|
||||
SendCommandNG(CMD_HF_DESFIRE_INFO, NULL, 0);
|
||||
if (WaitForResponseTimeout(CMD_HF_DESFIRE_INFO, &resp, 1500) == false) {
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
DropField();
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
|
|
@ -263,7 +263,7 @@ static int get_ulc_3des_key_magic(uint64_t magic_type, uint8_t *key) {
|
|||
SendCommandNG(CMD_HF_MIFARE_READBL_EX, (uint8_t *)&payload, sizeof(payload));
|
||||
PacketResponseNG resp;
|
||||
if (WaitForResponseTimeout(CMD_HF_MIFARE_READBL_EX, &resp, 1500) == false) {
|
||||
PrintAndLogEx(WARNING, "command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
|
@ -403,7 +403,7 @@ static bool ul_select_rats(iso14a_card_select_t *card) {
|
|||
uint8_t rats[] = { 0xE0, 0x80 }; // FSDI=8 (FSD=256), CID=0
|
||||
SendCommandMIX(CMD_HF_ISO14443A_READER, ISO14A_RAW | ISO14A_APPEND_CRC | ISO14A_NO_DISCONNECT, sizeof(rats), 0, rats, sizeof(rats));
|
||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 1500) == false) {
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1712,7 +1712,7 @@ static int mfu_dump_tag(uint16_t pages, void **pdata, uint16_t *len) {
|
|||
SendCommandMIX(CMD_HF_MIFAREU_READCARD, 0, pages, keytype, key, 4);
|
||||
PacketResponseNG resp;
|
||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 2500) == false) {
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
free(*pdata);
|
||||
res = PM3_ETIMEOUT;
|
||||
goto out;
|
||||
|
@ -1997,7 +1997,7 @@ static int mfu_fingerprint(uint64_t tagtype, bool hasAuthKey, const uint8_t *aut
|
|||
SendCommandMIX(CMD_HF_MIFAREU_READCARD, 0, pages, keytype, authkey, ak_len);
|
||||
PacketResponseNG resp;
|
||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 2500) == false) {
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
res = PM3_ETIMEOUT;
|
||||
goto out;
|
||||
}
|
||||
|
@ -2819,7 +2819,7 @@ static int CmdHF14AMfUWrBl(const char *Cmd) {
|
|||
}
|
||||
case PM3_ETIMEOUT:
|
||||
default: {
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2932,7 +2932,7 @@ static int CmdHF14AMfURdBl(const char *Cmd) {
|
|||
PrintAndLogEx(WARNING, "Failed reading block: ( %02x )", isOK);
|
||||
}
|
||||
} else {
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
}
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
@ -3252,7 +3252,7 @@ static int CmdHF14AMfUDump(const char *Cmd) {
|
|||
SendCommandMIX(CMD_HF_MIFAREU_READCARD, start_page, pages, keytype, authKeyPtr, ak_len);
|
||||
PacketResponseNG resp;
|
||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 2500) == false) {
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
|
@ -3275,7 +3275,7 @@ static int CmdHF14AMfUDump(const char *Cmd) {
|
|||
}
|
||||
|
||||
if (GetFromDevice(BIG_BUF, data, buffer_size, startindex, NULL, 0, NULL, 2500, false) == false) {
|
||||
PrintAndLogEx(WARNING, "command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
|
@ -3454,7 +3454,7 @@ static void wait4response(uint8_t b) {
|
|||
PrintAndLogEx(WARNING, "failed to write block %d", b);
|
||||
}
|
||||
} else {
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3540,7 +3540,7 @@ int CmdHF14MfUTamper(const char *Cmd) {
|
|||
else
|
||||
PrintAndLogEx(SUCCESS, "Tamper message written successfully");
|
||||
} else {
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3586,7 +3586,7 @@ int CmdHF14MfUTamper(const char *Cmd) {
|
|||
else
|
||||
PrintAndLogEx(SUCCESS, "Tamper configuration written successfully");
|
||||
} else {
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4074,7 +4074,7 @@ static int CmdHF14AMfUCSetPwd(const char *Cmd) {
|
|||
return PM3_ESOFT;
|
||||
}
|
||||
} else {
|
||||
PrintAndLogEx(WARNING, "command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
return PM3_SUCCESS;
|
||||
|
@ -4116,7 +4116,7 @@ static int CmdHF14AMfUCSetUid(const char *Cmd) {
|
|||
clearCommandBuffer();
|
||||
SendCommandMIX(CMD_HF_MIFAREU_READBL, 2, 0, 0, NULL, 0);
|
||||
if (!WaitForResponseTimeout(CMD_ACK, &resp, 1500)) {
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
|
@ -4129,7 +4129,7 @@ static int CmdHF14AMfUCSetUid(const char *Cmd) {
|
|||
hf14a_config config;
|
||||
SendCommandNG(CMD_HF_ISO14443A_GET_CONFIG, NULL, 0);
|
||||
if (!WaitForResponseTimeout(CMD_HF_ISO14443A_GET_CONFIG, &resp, 2000)) {
|
||||
PrintAndLogEx(WARNING, "command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out);
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
memcpy(&config, resp.data.asBytes, sizeof(hf14a_config));
|
||||
|
@ -4148,7 +4148,7 @@ static int CmdHF14AMfUCSetUid(const char *Cmd) {
|
|||
clearCommandBuffer();
|
||||
SendCommandMIX(CMD_HF_MIFAREU_WRITEBL, 0, 0, 0, data, sizeof(data));
|
||||
if (!WaitForResponseTimeout(CMD_ACK, &resp, 1500)) {
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
|
@ -4160,7 +4160,7 @@ static int CmdHF14AMfUCSetUid(const char *Cmd) {
|
|||
clearCommandBuffer();
|
||||
SendCommandMIX(CMD_HF_MIFAREU_WRITEBL, 1, 0, 0, data, sizeof(data));
|
||||
if (!WaitForResponseTimeout(CMD_ACK, &resp, 1500)) {
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
|
@ -4172,7 +4172,7 @@ static int CmdHF14AMfUCSetUid(const char *Cmd) {
|
|||
clearCommandBuffer();
|
||||
SendCommandMIX(CMD_HF_MIFAREU_WRITEBL, 2, 0, 0, data, sizeof(data));
|
||||
if (!WaitForResponseTimeout(CMD_ACK, &resp, 1500)) {
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
|
@ -5774,7 +5774,7 @@ static int CmdHF14AMfuWipe(const char *Cmd) {
|
|||
case PM3_ETIMEOUT:
|
||||
default: {
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
@ -5803,7 +5803,7 @@ ulc:
|
|||
return PM3_ESOFT;
|
||||
}
|
||||
} else {
|
||||
PrintAndLogEx(WARNING, "command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1440,7 +1440,7 @@ int set_fpga_mode(uint8_t mode) {
|
|||
SendCommandNG(CMD_SET_FPGAMODE, d, sizeof(d));
|
||||
PacketResponseNG resp;
|
||||
if (WaitForResponseTimeout(CMD_SET_FPGAMODE, &resp, 1000) == false) {
|
||||
PrintAndLogEx(WARNING, "command execution timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
if (resp.status != PM3_SUCCESS) {
|
||||
|
|
|
@ -181,7 +181,7 @@ int mfG4GetBlock(uint8_t *pwd, uint8_t blockno, uint8_t *data, uint8_t workFlags
|
|||
SendCommandNG(CMD_HF_MIFARE_G4_RDBL, (uint8_t *)&payload, sizeof(payload));
|
||||
PacketResponseNG resp;
|
||||
if (WaitForResponseTimeout(CMD_HF_MIFARE_G4_RDBL, &resp, 1500) == false) {
|
||||
PrintAndLogEx(WARNING, "command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
|
@ -209,7 +209,7 @@ int mfG4SetBlock(uint8_t *pwd, uint8_t blockno, uint8_t *data, uint8_t workFlags
|
|||
SendCommandNG(CMD_HF_MIFARE_G4_WRBL, (uint8_t *)&payload, sizeof(payload));
|
||||
PacketResponseNG resp;
|
||||
if (WaitForResponseTimeout(CMD_HF_MIFARE_G4_WRBL, &resp, 1500) == false) {
|
||||
PrintAndLogEx(WARNING, "command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
|
|
|
@ -964,7 +964,7 @@ int mfReadSector(uint8_t sectorNo, uint8_t keyType, const uint8_t *key, uint8_t
|
|||
return PM3_EUNDEF;
|
||||
}
|
||||
} else {
|
||||
PrintAndLogEx(DEBUG, "Command execute timeout");
|
||||
PrintAndLogEx(DEBUG, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
return PM3_SUCCESS;
|
||||
|
@ -988,7 +988,7 @@ int mfReadBlock(uint8_t blockNo, uint8_t keyType, const uint8_t *key, uint8_t *d
|
|||
return PM3_ESOFT;
|
||||
}
|
||||
} else {
|
||||
PrintAndLogEx(DEBUG, "Command execute timeout");
|
||||
PrintAndLogEx(DEBUG, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
return PM3_SUCCESS;
|
||||
|
@ -1015,7 +1015,7 @@ int mfEmlGetMem(uint8_t *data, int blockNum, int blocksCount) {
|
|||
|
||||
PacketResponseNG resp;
|
||||
if (WaitForResponseTimeout(CMD_HF_MIFARE_EML_MEMGET, &resp, 1500) == 0) {
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
|
@ -1187,7 +1187,7 @@ int mfCSetBlock(uint8_t blockNo, uint8_t *data, uint8_t *uid, uint8_t params) {
|
|||
return PM3_EUNDEF;
|
||||
}
|
||||
} else {
|
||||
PrintAndLogEx(WARNING, "command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
return PM3_SUCCESS;
|
||||
|
@ -1204,7 +1204,7 @@ int mfCGetBlock(uint8_t blockNo, uint8_t *data, uint8_t params) {
|
|||
}
|
||||
memcpy(data, resp.data.asBytes, MFBLOCK_SIZE);
|
||||
} else {
|
||||
PrintAndLogEx(WARNING, "command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
return PM3_SUCCESS;
|
||||
|
@ -1220,7 +1220,7 @@ int mfGen3UID(uint8_t *uid, uint8_t uidlen, uint8_t *oldUid) {
|
|||
}
|
||||
return resp.status;
|
||||
} else {
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
}
|
||||
|
@ -1235,7 +1235,7 @@ int mfGen3Block(uint8_t *block, int blockLen, uint8_t *newBlock) {
|
|||
}
|
||||
return resp.status;
|
||||
} else {
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
}
|
||||
|
@ -1247,7 +1247,7 @@ int mfGen3Freeze(void) {
|
|||
if (WaitForResponseTimeout(CMD_HF_MIFARE_GEN3FREEZ, &resp, 3500)) {
|
||||
return resp.status;
|
||||
} else {
|
||||
PrintAndLogEx(WARNING, "Command execute timeout");
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ int main(int argc, char *argv[]) {
|
|||
printf("Recover key from two 32-bit reader authentication answers only!\n\n");
|
||||
|
||||
if (argc < 7) {
|
||||
printf(" syntax: %s <uid> <nt> <{nr_0}> <{ar}_0> <{nr_1}> <{ar}_0>\n\n", argv[0]);
|
||||
printf(" syntax: %s <uid> <nt> <{nr_0}> <{ar}_0> <{nr_1}> <{ar}_1>\n\n", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue