Question

I have .mfd files and I want to import my information in .mfd file to python in order to save in database(sqlite3) .Someone can help me or give me the way to do...thank you!

I use libnfc (nfc-mfclassic) to read all block in tag and then I got .mfd. If I want to save data like that to database in python .What should I have to do ...

my tag is mifare 1k

I run this thing :nfc-mfclassic r a dumptest.mfd in terminal (Ubuntu) to get all of data

Usage: nfc-mfclassic r|w a|b <dump.mfd> [<keys.mfd>]
  r|w           - Perform read from (r) or write to (w) card
  a|b           - Use A or B keys for action
  <dump.mfd>    - MiFare Dump (MFD) used to write (card to MFD) or (MFD to card)
  <keys.mfd>    - MiFare Dump (MFD) that contain the keys (optional)
Or: nfc-mfclassic x <dump.mfd> <payload.bin>
  x             - Extract payload (data blocks) from MFD
  <dump.mfd>    - MiFare Dump (MFD) that contains wanted payload
  <payload.bin> - Binary file where payload will be extracted
Was it helpful?

Solution

Here you can find a program to read dumps of nfc-mfclassic in Python: http://habrahabr.ru/post/141213/ (page is in Russian, you can use GoogleTranslate or scroll to "Программа на питоне, которая читает данные из дампа полученного с помощью nfc-mfclassic" section). After it use python-sqlite (http://docs.python.org/library/sqlite3.html) to save data to sqllite.

OTHER TIPS

Try my Mifare dumps parser https://github.com/zhovner/mfdread Code is pretty simple, so you can modify it to do what you need.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top