Merge pull request #3666 from dunderhay/add-client-cancellation-to-MIFARE-nonce-acquisition
Allow client cancellation during MIFARE nonce acquisition - Fixes #3665
This commit is contained in:
1 file changed
+6
-2
+6
-2
@@ -1015,11 +1015,13 @@ void MifareAcquireNonces(const mf_acquire_nonces_t *payload) {
|
||||
while (num_nonces < MFC_MAX_NONCES) {
|
||||
|
||||
// Test if the action was cancelled
|
||||
if (BUTTON_PRESS()) {
|
||||
if (BUTTON_PRESS() || data_available()) {
|
||||
isOK = PM3_EOPABORTED;
|
||||
field_off = true;
|
||||
break;
|
||||
}
|
||||
|
||||
WDT_HIT();
|
||||
|
||||
if (!have_uid) { // need a full select cycle to get the uid first
|
||||
iso14a_card_select_t card_info;
|
||||
@@ -1144,12 +1146,14 @@ void MifareAcquireEncryptedNonces(const mf_acquire_nonces_t *payload) {
|
||||
while (num_pairs < MFC_MAX_NONCE_PAIRS) {
|
||||
|
||||
// Test if the action was cancelled
|
||||
if (BUTTON_PRESS()) {
|
||||
if (BUTTON_PRESS() || data_available()) {
|
||||
isOK = PM3_EOPABORTED;
|
||||
field_off = true;
|
||||
break;
|
||||
}
|
||||
|
||||
WDT_HIT();
|
||||
|
||||
if (have_uid == false) { // need a full select cycle to get the uid first
|
||||
iso14a_card_select_t card_info;
|
||||
if (iso14443a_select_card(uid, &card_info, &cuid, true, 0, true) == 0) {
|
||||
|
||||
Reference in new issue
Block a user