unblob icon indicating copy to clipboard operation
unblob copied to clipboard

Exception in AR handler invalid literal for int()

Open AndrewFasano opened this issue 1 year ago • 3 comments

Running unblob on https://static.tp-link.com/upload/firmware/2021/202107/20210729/ER7206(UN)_v1_1.1.1%20Build%2020210723.zip produces the following error in the ar extractor:

2024-02-14 01:02.45 [error    ] Unhandled Exception during chunk calculation handler=ar pid=21 severity=<Severity.ERROR: 'ERROR'> start_offset=0x0
Traceback (most recent call last):
  File "/unblob/unblob/finder.py", line 35, in _calculate_chunk
    return handler.calculate_chunk(file, real_offset)
  File "/unblob/unblob/handlers/archive/ar.py", line 37, in calculate_chunk
    ar.read_all_headers()
  File "/usr/local/lib/python3.10/dist-packages/arpy.py", line 403, in read_all_headers
    while self.read_next_header() is not None:
  File "/usr/local/lib/python3.10/dist-packages/arpy.py", line 378, in read_next_header
    header = self.__read_file_header(self.next_header_offset)
  File "/usr/local/lib/python3.10/dist-packages/arpy.py", line 299, in __read_file_header
    add_len = self.__fix_name(file_header)
  File "/usr/local/lib/python3.10/dist-packages/arpy.py", line 350, in __fix_name
    gnu_position = int(header.proxy_name[1:])
ValueError: invalid literal for int() with base 10: b'SYM64'

AndrewFasano avatar Feb 14 '24 01:02 AndrewFasano

Upstream patch sent at https://github.com/viraptor/arpy/pull/21

qkaiser avatar Feb 14 '24 08:02 qkaiser

PR in arpy has been opened for 9 months without any signs of progress. I'll fork it and make unblob use it.

qkaiser avatar Dec 04 '24 08:12 qkaiser

We're thinking about implementing our own AR extractor using modern python and stronger implementation than unar or arpy right now.

qkaiser avatar Feb 18 '25 16:02 qkaiser