MarioVilas / shellcode_tools

Miscellaneous tools written in Python, mostly centered around shellcodes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

-a option on bin2py doesn't append

MichaelHipp opened this issue · comments

Whenever I use bin2py multiple times like this I only get the last item.

bin2py  foo.jpg -o output.py  # this one will get overwritten by the next
bin2py  bar.png -a -o output.py  # this one will be fine

The problem appears to be in lines 220 and 264 where it does

open(filename, 'w+')

I think this should be like this for appending rather than truncating.

open(filename, 'a')

Oops, thanks for spotting it! Fixed in the latest comit :)