Proxmark3 community

Research, development and trades concerning the powerful Proxmark3 device.

Remember; sharing is caring. Bring something back to the community.


"Learn the tools of the trade the hard way." +Fravia

You are not logged in.

Announcement

Time changes and with it the technology
Proxmark3 @ discord

Users of this forum, please be aware that information stored on this site is not private.

#1 2013-02-14 23:55:46

casper112
Contributor
Registered: 2013-02-10
Posts: 15

Help to convert .bin to .eml

Hi, I´m trying to convert it with scripts python but I always got this error:

C:\>python bin2text.py dumpdata.bin output.txt
  File "bin2text.py", line 14
    with file(argv[1], "rb") as file_inp, file(argv[2], "w") as file_out:
                                        ^
SyntaxError: invalid syntax

Anyone can help me??? or anyone have a program to convert .din to .eml???

Thx smile

Offline

#2 2013-02-15 20:03:23

C0Y0-Ck3r
Contributor
Registered: 2012-11-08
Posts: 87

Re: Help to convert .bin to .eml

can you put you source code so someone would fix your problem

Offline

#3 2013-02-15 21:09:26

casper112
Contributor
Registered: 2013-02-10
Posts: 15

Re: Help to convert .bin to .eml

Yeah:

#!/usr/bin/python
from __future__ import with_statement
import sys
import binascii

READ_BLOCKSIZE = 16

def main(argv):
    argc = len(argv)
    if argc < 3:
        print 'Usage:', argv[0], 'dumpdata.bin output.txt'
        sys.exit(1)

    with file(argv[1], "rb") as file_inp, file(argv[2], "w") as file_out:
        while True:
            byte_s = file_inp.read(READ_BLOCKSIZE)
            if not byte_s:
                break
            hex_char_repr = binascii.hexlify(byte_s)
            file_out.write(hex_char_repr)
            file_out.write("\n")

if __name__ == '__main__':
    main(sys.argv)

Offline

#4 2013-02-16 16:59:40

C0Y0-Ck3r
Contributor
Registered: 2012-11-08
Posts: 87

Re: Help to convert .bin to .eml

I've changed to this, the problem is in the with statement. Use this and it will work.

#!/usr/bin/python

from __future__ import with_statement
import sys
import binascii

READ_BLOCKSIZE = 16

def main(argv):
    argc = len(argv)
    if argc < 3:
        print 'Usage:', argv[0], 'dumpdata.bin output.txt'
        sys.exit(1)

    with file(argv[1], "rb") as file_inp:
        with file(argv[2], "w") as file_out:
            while True:
                byte_s = file_inp.read(READ_BLOCKSIZE)
                if not byte_s:
                    break
                hex_char_repr = binascii.hexlify(byte_s)
                file_out.write(hex_char_repr)
                file_out.write("\n")

if __name__ == '__main__':
    main(sys.argv)

Offline

#5 2013-02-16 18:42:21

casper112
Contributor
Registered: 2013-02-10
Posts: 15

Re: Help to convert .bin to .eml

working fine thak´s so much smile I already fixed txt2bin.py

Could u send me your proxmark youtube videotutorial??? because youtube revomed it sad and I can´t wacthed it sad

thanks

Offline

#6 2013-02-17 15:30:38

C0Y0-Ck3r
Contributor
Registered: 2012-11-08
Posts: 87

Re: Help to convert .bin to .eml

well its not youtube, its a guy here named stylyroper that notify it to youtube and he passed by proxmark3 so they remove it. The guy is sick and doesn't want me to share that with people. But don't worry, a serie of proxmark3 tutorials is coming. Just be patient wink

Offline

Board footer

Powered by FluxBB