Created
March 3, 2015 02:38
-
-
Save magixx/f62709452233185225da to your computer and use it in GitHub Desktop.
nfctools (Linux) dump to Mifare Classic Tool (Android) dump
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import binascii | |
import glob | |
char_count = 32 | |
for filename in glob.glob('f7w*'): | |
with open(filename, 'rb') as f, open(filename + '.txt', 'w') as output: | |
data = binascii.hexlify(f.read()) | |
for i, line in enumerate([data[i:i+char_count] for i in range(0, len(data), char_count)]): | |
if i % 4 == 0: | |
output.writelines('+Sector: ' + str(i / 4) + '\n') | |
output.write(line + '\n') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment