mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-11-11 01:55:38 +08:00
27 lines
661 B
Python
Executable file
27 lines
661 B
Python
Executable file
#!/usr/bin/python
|
|
|
|
'''
|
|
# Andrei Costin <zveriu@gmail.com>, 2011
|
|
# pm3_eml2mfd.py
|
|
# Converts PM3 Mifare Classic emulator EML text file to MFD binary dump file
|
|
'''
|
|
|
|
from __future__ import with_statement
|
|
import sys
|
|
import binascii
|
|
|
|
def main(argv):
|
|
argc = len(argv)
|
|
if argc < 3:
|
|
print 'Usage:', argv[0], 'input.eml output.mfd'
|
|
sys.exit(1)
|
|
|
|
with file(argv[1], "r") as file_inp, file(argv[2], "wb") as file_out:
|
|
for line in file_inp:
|
|
line = line.rstrip('\n').rstrip('\r')
|
|
print line
|
|
data = binascii.unhexlify(line)
|
|
file_out.write(data)
|
|
|
|
if __name__ == '__main__':
|
|
main(sys.argv)
|