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

Improve support for gen2 and gen3 tags #608

Merged
merged 17 commits into from
Jun 28, 2020

Conversation

gelotus
Copy link
Contributor

@gelotus gelotus commented Jun 26, 2020

Ok, my ocd wins..
There is a rework including @AdamLaurie commits.
Tested before and after on genuine and gen2.
Now you can rewrite gen2 with W, please see commit descs

@AdamLaurie
Copy link
Member

Nice work @gelotus - thank you! But please modify unlock_card() so it does not write on READ commands. If this is the only way to detect Magic cards then we should print a warning that we are about to try to write to the card and ask if the user wants to go ahead or skip that test.

@gelotus
Copy link
Contributor Author

gelotus commented Jun 26, 2020

Ok, fixed. About your second question, about one month ago I've bought a lot of 500 gen2 tags,for what I see, they have a random uid from factory. I haven't checked rigorously, but from my memory I remember so. Maybe when I'll buy another batch I'll check better. If we use is_directwrite() we break gen3 so the tag burn during check.
About the warning and the user intervention, this will break a possible scripted using of the program, for example I'm using it for quickly format that 500 tags what I have talked before. We can add an override switch but I think would be better to rework the args parser first. Anyway I don't see troubles whit this behaviour, if we try to W to a genuine or gen3 tag, writing simply fails, for gen1 it continues with its normal behaviour. If you think about a possible overwrite of the content, the same happens on a gen1.

utils/nfc-mfclassic.c Outdated Show resolved Hide resolved
@gelotus
Copy link
Contributor Author

gelotus commented Jun 27, 2020

Sorry, I hadn't noticed that typo..

@AdamLaurie AdamLaurie merged commit 0de5596 into nfc-tools:master Jun 28, 2020
@AdamLaurie
Copy link
Member

AdamLaurie commented Jun 28, 2020

Note that I have merged this as the non-writing of full sectors is a bigger issue but there is still a problem here with 4k DirectWrite - on a read operation standard 4K cards are being recognised as DirectWrite - @gelotus want to take another look?

@gelotus
Copy link
Contributor Author

gelotus commented Jun 28, 2020

Yes I'll could take a look , but unfortunately I haven't a 4k tag for testing. We'll see in the next days if I'll find one

@gelotus gelotus deleted the nfc-mfclassic branch June 29, 2020 18:10
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