]> git.zerfleddert.de Git - proxmark3-svn/blame - client/pm3_eml2mfd.py
merged trunk changes into branch
[proxmark3-svn] / client / pm3_eml2mfd.py
CommitLineData
1f947c4b 1#!/usr/bin/python
2
3'''
4# Andrei Costin <zveriu@gmail.com>, 2011
5# pm3_eml2mfd.py
6# Converts PM3 Mifare Classic emulator EML text file to MFD binary dump file
7'''
8
70049c47 9from __future__ import with_statement
1f947c4b 10import sys
11import binascii
12
13def main(argv):
14 argc = len(argv)
15 if argc < 3:
16 print 'Usage:', argv[0], 'input.eml output.mfd'
17 sys.exit(1)
70049c47 18
19 with file(argv[1], "r") as file_inp, file(argv[2], "wb") as file_out:
20 for line in file_inp:
21 line = line.rstrip('\n').rstrip('\r')
1f947c4b 22 print line
23 data = binascii.unhexlify(line)
24 file_out.write(data)
1f947c4b 25
11d23264 26if __name__ == '__main__':
27 main(sys.argv)
Impressum, Datenschutz