Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Mifare Classic sim with interactive and reader attack mode never returning console #2198

Merged
merged 2 commits into from
Dec 6, 2023
Merged

Fix Mifare Classic sim with interactive and reader attack mode never returning console #2198

merged 2 commits into from
Dec 6, 2023

Conversation

datatags
Copy link
Contributor

@datatags datatags commented Dec 6, 2023

The help for hf mf sim says that if -i is passed, "Console will not be returned until simulation finishes or is aborted." However, when using interactive with the reader attack option (hf mf sim -ix), the console does not return when the simulation is finished or when the button is pressed.

This seems to be because in cmdhfmf.c, it continues waiting for more CMD_ACKs after processing the information from the device, while the device only sends CMD_ACK once (after the simulation is finished or the button is pressed.) Adding break after the readerAttack line seems to fix this, and doesn't seem to cause any other issues.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Copy link

github-actions bot commented Dec 6, 2023

You are welcome to add an entry to the CHANGELOG.md as well

@iceman1001 iceman1001 merged commit 88e84f5 into RfidResearchGroup:master Dec 6, 2023
@datatags datatags deleted the interactive-mfc-sim-return branch December 20, 2023 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants