nfc-tools / mfoc

Mifare Classic Offline Cracker
GNU General Public License v2.0
1.22k stars 269 forks source link

Error write dump Mifare 4k #37

Closed GiorgioRoma closed 7 years ago

GiorgioRoma commented 7 years ago

When i used mfoc to read dump of mifare classic 4k, read all 256 block, but don't write dump. The error is: Error, cannot write dump

gudata commented 7 years ago

check free space disk :)

GiorgioRoma commented 7 years ago

:-) no no, the disk is empty..... I use mfoc with Kali Linux that run on Virtual box (the real os is OSX 10.12.4). Mfoc, reads and writes correctly the 1k mifare, but does not write on the mifare 4k. This is the code that generates the error (I think there is a problem with the dump size check):

// Finally save all keys + data to file uint16_t dump_size = (t.num_blocks + 1) * 16; if (fwrite(&mtDump, 1, dump_size, pfDump) != dump_size) { fprintf(stdout, "Error, cannot write dump\n"); fclose(pfDump); goto error; } fclose(pfDump);

(I'm trying to use mfoc directly from mac, but i have another error):

mfoc -O tes.mfd error libnfc.driver.acr122_usb Unable to claim USB interface (Permission denied) No NFC device found.

nfc-list nfc-list uses libnfc 1.7.1 error libnfc.driver.acr122_usb Unable to claim USB interface (Permission denied) nfc-list: ERROR: Unable to open NFC device: acr122_usb:020:012 NFC device: ACS ACR122U / ACR122U214 opened 1 ISO14443A passive target(s) found: ISO/IEC 14443A (106 kbps) target: ATQA (SENS_RES): xx xx
UID (NFCID1): xx xx xx xx
SAK (SEL_RES): xx

GiorgioRoma commented 7 years ago

Update: I managed to use mfoc from mac osx, no dump writing error even with 4k mifare.