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

更改aime示例中SAK(88->08)使写入空白卡后可被读取 #17

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

chenxi050402
Copy link
Contributor

我在测试写入空白卡时发现刷卡没反应,发现使用的示例中Block 0内的SAK为88(Aime_Reader.h中只读取08的卡),遂提交PR

@Sucareto
Copy link
Owner

经测试,在当前最新版本的代码依赖库,将 aime示例.mct 写入 CUID 卡,即使 Sector 0 Block 0 SAK 位是 0x88,卡片信息仍然显示 SAK 是 0x08,读卡程序读出来的结果也是 0x08,不会影响读卡。

如果使用 UID 卡,Sector 0 Block 0 无法被修改,也不用担心该问题。

该示例文件仅用于展示 Aime 兼容卡的格式,其中用到的是 Sector 0 的 Block 2 和 Block 3,不推荐全部覆写。

另外,代码中的 SAK == 0x08 的判断,只是用于解决 CPU 卡对读卡逻辑的影响,并非合适的实现,在有更好的判断方式后会改掉,如果会影响到你的使用,可自行修改代码。

如果有更多信息,请补充。

@chenxi050402
Copy link
Contributor Author

chenxi050402 commented Feb 18, 2024

经调查,aime示例中block0的sak信息可能和用来dump的原卡的sak是不同的,原因:https://gist.github.com/equipter/3022aea4e371e585ff6e46de637e7769
将该文件写入1代cuid卡后读取的sak会变成block0里的数值(所用工具https://github.com/flipperdevices/flipperzero-good-faps/tree/dev/nfc_magic

@Sucareto
Copy link
Owner

原来如此!感谢情报~

@Sucareto Sucareto merged commit d288930 into Sucareto:main Feb 22, 2024
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.

2 participants