mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-09-23 16:56:15 +08:00
Merge pull request #2036 from AloneLiberty/patch-1
Don't require valid key or proxmark3 for hardnested with --tests
This commit is contained in:
commit
fa0db30143
|
@ -2241,8 +2241,9 @@ static int CmdHF14AMfNestedHard(const char *Cmd) {
|
||||||
snprintf(filename, FILE_PATH_SIZE, "hf-mf-%s-nonces.bin", uid);
|
snprintf(filename, FILE_PATH_SIZE, "hf-mf-%s-nonces.bin", uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (g_session.pm3_present && !tests) {
|
||||||
// detect MFC EV1 Signature
|
// detect MFC EV1 Signature
|
||||||
if (g_session.pm3_present && detect_mfc_ev1_signature() && keylen == 0) {
|
if (detect_mfc_ev1_signature() && keylen == 0) {
|
||||||
PrintAndLogEx(INFO, "MIFARE Classic EV1 card detected");
|
PrintAndLogEx(INFO, "MIFARE Classic EV1 card detected");
|
||||||
blockno = 69;
|
blockno = 69;
|
||||||
keytype = MF_KEY_B;
|
keytype = MF_KEY_B;
|
||||||
|
@ -2250,7 +2251,6 @@ static int CmdHF14AMfNestedHard(const char *Cmd) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (known_target_key == false && nonce_file_read == false) {
|
if (known_target_key == false && nonce_file_read == false) {
|
||||||
|
|
||||||
// check if tag doesn't have static nonce
|
// check if tag doesn't have static nonce
|
||||||
if (detect_classic_static_nonce() == NONCE_STATIC) {
|
if (detect_classic_static_nonce() == NONCE_STATIC) {
|
||||||
PrintAndLogEx(WARNING, "Static nonce detected. Quitting...");
|
PrintAndLogEx(WARNING, "Static nonce detected. Quitting...");
|
||||||
|
@ -2265,6 +2265,7 @@ static int CmdHF14AMfNestedHard(const char *Cmd) {
|
||||||
return PM3_EWRONGANSWER;
|
return PM3_EWRONGANSWER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
PrintAndLogEx(INFO, "Target block no " _YELLOW_("%3d") ", target key type: " _YELLOW_("%c") ", known target key: " _YELLOW_("%02x%02x%02x%02x%02x%02x%s"),
|
PrintAndLogEx(INFO, "Target block no " _YELLOW_("%3d") ", target key type: " _YELLOW_("%c") ", known target key: " _YELLOW_("%02x%02x%02x%02x%02x%02x%s"),
|
||||||
trg_blockno,
|
trg_blockno,
|
||||||
|
|
Loading…
Reference in a new issue