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

Add 7 Byte UID support to "Clone UID" tool #278

Closed
wants to merge 6 commits into from

Conversation

dmaasland
Copy link

Hello,

This is my first attempt to contribute to the project so go easy on me :). I've tried adding support for 7 Byte UID cards to the "Clone UID" tool. The changes I made seem to work for 7 Byte UID gen 2 magic cards. The new block 0 is written and the UID is changed.

I wasn't able to test this with 4 byte UID cards as I have no gen 2 magic cards with 4 byte UID's.

The only thing I wasn't able to do was add a translation for the "7 Byte UID" string. I hope that's okay.

I am not in any way a Java programmer so I'm open to any suggestions and improvements.

Thanks!

@ikarus23
Copy link
Owner

Sorry I've not commented on this. I've noticed you pull request but until now I lacked the time to review it. But in any case: Thank you for contributing!

@ikarus23
Copy link
Owner

ikarus23 commented Aug 18, 2020

Hi, I finally found some time to look through your code. Doesn't look too bad! However, I wanted to have things to be more flexible.

  • Not only support 7-byte-UIDs but also 10-byte UIDs.
  • Don't make the user choose the UID length, but get if from the original tag.

I've implemented these changes in this branch. Also, I've build a testing version and it would be really great if you can test it. I don't have 7 byte 2nd gen tag.

@victorclaessen
Copy link

I have tested this with an S50 (1k) mifare classic card with 7 byte UID which is supposedly magic. The cloning process now proceeds without error, but the actual UID is not changed, which may very well be the card's fault. (I also failed to change the UID with libnfc.) I have yet to find a reliable source for a 7 byte UID magic card. But the flow of the software seems to work well now.

It also warned me when I tried to write a 7 byte UID to another card that had a 4 byte UID.

@dmaasland
Copy link
Author

Sorry I completely missed the update. Very cool! @victorclaessen there are multiple types of "magic" cards. Some require a special command to change the UUID, others you can just write sector 0 directly. I have had success with these in the past:

https://www.aliexpress.com/item/32830423749.html

I'm currently out but new cards are on the way. I'll test as soon as they come in!

@dmaasland
Copy link
Author

Tested it on an old card, worked perfectly! Uid cloned no problem :).

@ikarus23
Copy link
Owner

Perfect! Thanks for testing and the feedback.

@ikarus23 ikarus23 closed this Aug 28, 2020
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

3 participants