Authentication MIFARE卡的读写问题

Authentication MIFARE卡的读写问题,authentication,nfc,mifare,contactless-smartcard,lib-nfc,Authentication,Nfc,Mifare,Contactless Smartcard,Lib Nfc,当我尝试读取或写入MIFARE经典卡时,我得到以下输出: nfc-mfclassic r a mfoc_output.mfd mfoc_output.mfd NFC reader: ACS / ACR122U PICC Interface opened Expected MIFARE Classic card with UID starting as: 00000000 Got card with UID starting as: 049f30b2 Ab

当我尝试读取或写入MIFARE经典卡时,我得到以下输出:

nfc-mfclassic r a mfoc_output.mfd mfoc_output.mfd 
NFC reader: ACS / ACR122U PICC Interface opened
Expected MIFARE Classic card with UID starting as: 00000000
Got card with UID starting as:                     049f30b2
Aborting!
有什么想法吗

谢谢你的回答,迈克尔,但那也不行 这是输出:

nfc-mfclassic r a mfoc_output.mfd NFC reader: ACS / ACR122U PICC Interface opened Found MIFARE Classic card: ISO/IEC 14443A (106 kbps) target: ATQA (SENS_RES): 00 04 UID (NFCID1): 04 9f 30 b2 SAK (SEL_RES): 08 Guessing size: seems to be a 1024-byte card Reading out 64 blocks |nfc_initiator_transceive_bytes: Mifare Authentication Failed nfc_initiator_transceive_bytes: Mifare Authentication Failed nfc_initiator_transceive_bytes: Mifare Authentication Failed nfc_initiator_transceive_bytes: Mifare Authentication Failed nfc_initiator_transceive_bytes: Mifare Authentication Failed nfc_initiator_transceive_bytes: Mifare Authentication Failed nfc_initiator_transceive_bytes: Mifare Authentication Failed ! failed to read trailer block 0x3f nfc MFR a mfoc_output.mfd NFC读卡器:ACS/ACR122U PICC接口打开 找到MIFARE经典卡: ISO/IEC 14443A(106 kbps)目标: ATQA(传感器):00 04 UID(NFCID1):04 9f 30 b2 萨克(选区):08 猜测大小:似乎是一个1024字节的卡 读取64个块| nfc |启动器|收发器|字节:Mifare身份验证失败 nfc_启动器_收发器_字节:Mifare身份验证失败 nfc_启动器_收发器_字节:Mifare身份验证失败 nfc_启动器_收发器_字节:Mifare身份验证失败 nfc_启动器_收发器_字节:Mifare身份验证失败 nfc_启动器_收发器_字节:Mifare身份验证失败 nfc_启动器_收发器_字节:Mifare身份验证失败 ! 未能读取拖车块0x3f 问题是我丢失了密钥文件,现在我无法写入或读取该标记,我正在尝试使用mfoc生成密钥文件,但在将密钥转储到文件后,nfc mfclassic仍然表示身份验证失败

您正在使用文件
mfoc_output.mfd
作为转储卡内容的目标文件和访问卡扇区的关键材料的源文件。通常这不是您想要的,因为这会覆盖您的密钥文件

这里的问题是您的密钥文件(由第二个文件名指定)以字节
00
开头。但是,
nfc mfclassic
检查该文件是否以MIFARE CLassic标记的UID的前4个字节开头,如果不匹配,将中止转储过程

如果同时使用文件
mfoc_output.mfd
,则目标文件和密钥文件确实是您想要的,您可以编辑文件以标记UID的前4个字节开始(即使用
04 9f 30 b2
),也可以通过指定“force”参数强制
nfc mfclassic
以任何方式使用该文件:

 nfc-mfclassic r a mfoc_output.mfd mfoc_output.mfd f
如果不想使用
mfoc_output.mfd
作为密钥文件,只需使用

 nfc-mfclassic r a mfoc_output.mfd
相反,它将尝试使用一组默认/已知密钥访问MIFARE扇区

 nfc-mfclassic r a mfoc_output.mfd mfoc_output.mfd f
 nfc-mfclassic r a mfoc_output.mfd