驱动准备
下载驱动 PL2303串口转USB驱 或 备用地址,安装完可以在 系统偏好设置 ▸ 网络 找到 USB-Serial Controller ,准备好驱动之后就可以扫描 USB 端口了
1 2
| cd /dev ls tty.usbserial*
|
软件安装,并修改配置文件
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| brew install libusb brew install libnfc brew install mfoc brew install mfcuk
vim /usr/local/Cellar/libnfc/1.8.0/etc/nfc/libnfc.conf 为 allow_autoscan = true allow_intrusive_scan = true device.name = "PN532 board via UART" device.connstring = "pn532_uart:/dev/tty.usbserial"
或 vim /usr/local/Cellar/libnfc/1.8.0/etc/nfc/libnfc.conf 修改为 allow_autoscan = true allow_intrusive_scan=yes
vim /usr/local/etc/nfc/devices.d/pn532.conf 内容为: name = "PN532" connstring = pn532_uart:/dev/tty.usbserial allow_intrusive_scan = true
|
命令
1 2 3 4 5 6 7
| nfc-list #读取信息,SAK 是 08,是可以被破解复制的 mfoc -P 500 -O uidcard.mfd #通过默认密钥解 -p 表示每次500的探测数探测,默认为20 mfcuk -C -R 0:A -s 250 -S 250 -v 3 #暴力解 mfoc -k 3c5d7f1e -O uidcard.mfd #通过已知密钥解 nfc-mfclassic W a bak.dump uidcard.dump f # W 参数表示以 unlocked write 方式写入包含 0 nfc-mfclassic w a u bak.mfd
|