1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-12 12:42:30 +04:00

classic poller fix early key reuse in dictionary attack state machine

by noproto
This commit is contained in:
MX
2025-02-24 21:40:21 +03:00
parent fc96bf2a2e
commit 5b2582930f

View File

@@ -1921,7 +1921,8 @@ NfcCommand mf_classic_poller_handler_nested_controller(MfClassicPoller* instance
sizeof(MfClassicKey)) : sizeof(MfClassicKey)) :
NULL; NULL;
} }
if((is_weak || is_last_iter_for_hard_key) && dict_attack_ctx->nested_nonce.count > 0) { if((is_weak && (dict_attack_ctx->nested_nonce.count == 1)) ||
(is_last_iter_for_hard_key && (dict_attack_ctx->nested_nonce.count == 8))) {
// Key verify and reuse // Key verify and reuse
dict_attack_ctx->nested_phase = MfClassicNestedPhaseDictAttackVerify; dict_attack_ctx->nested_phase = MfClassicNestedPhaseDictAttackVerify;
dict_attack_ctx->auth_passed = false; dict_attack_ctx->auth_passed = false;