added more keys (@equipter)
[RRG-proxmark3.git] / tools / pm3_eml2mfd.py
blob0a12f4788ec8730d2ffada28d943887d57a45ecf
1 #!/usr/bin/env python3
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 '''
10 import sys
11 import binascii
13 def main(argv):
14 argc = len(argv)
15 if argc < 3:
16 print('Usage:', argv[0], 'input.eml output.mfd')
17 sys.exit(1)
19 with open(argv[1], "r") as file_inp, open(argv[2], "wb") as file_out:
20 for line in file_inp:
21 line = line.rstrip('\n').rstrip('\r')
22 print(line)
23 data = binascii.unhexlify(line)
24 file_out.write(data)
26 if __name__ == '__main__':
27 main(sys.argv)