fork download
  1. #!/usr/bin/env python
  2. # -*- coding: UTF-8 -*-
  3.  
  4. import io
  5. import zlib
  6.  
  7. with open('firmware.bin', 'rb') as fp:
  8. fp.seek(0x23880, io.SEEK_SET)
  9. data = zlib.decompress(fp.read(0xd72c7), -zlib.MAX_WBITS)
  10.  
  11. with open('inflated.bin', 'wb') as fp:
  12. fp.write(data)
  13.  
Runtime error #stdin #stdout #stderr 0.03s 27704KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 7, in <module>
    with open('firmware.bin', 'rb') as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'firmware.bin'