mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 20:49:49 +04:00
Do not enter nested attack if card is already finished
This commit is contained in:
@@ -858,9 +858,10 @@ NfcCommand mf_classic_poller_handler_key_reuse_start(MfClassicPoller* instance)
|
|||||||
instance->mfc_event.type = MfClassicPollerEventTypeKeyAttackStop;
|
instance->mfc_event.type = MfClassicPollerEventTypeKeyAttackStop;
|
||||||
command = instance->callback(instance->general_event, instance->context);
|
command = instance->callback(instance->general_event, instance->context);
|
||||||
// Nested entrypoint
|
// Nested entrypoint
|
||||||
// TODO: Ensure nested attack isn't run if tag is fully read
|
bool nested_active = dict_attack_ctx->nested_phase != MfClassicNestedPhaseNone;
|
||||||
if(dict_attack_ctx->nested_phase == MfClassicNestedPhaseNone ||
|
if((nested_active &&
|
||||||
dict_attack_ctx->nested_phase != MfClassicNestedPhaseFinished) {
|
(dict_attack_ctx->nested_phase != MfClassicNestedPhaseFinished)) ||
|
||||||
|
(!(nested_active) && !(mf_classic_is_card_read(instance->data)))) {
|
||||||
instance->state = MfClassicPollerStateNestedController;
|
instance->state = MfClassicPollerStateNestedController;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user