tenable / esp32_image_parser

A toolkit for helping you reverse engineer ESP32 firmware.
MIT License
160 stars 41 forks source link

[create_elf] KeyError: '.iram0.text' #14

Open josesa opened 7 months ago

josesa commented 7 months ago

Getting the following errors on a binary

Dumping partition 'ota_0' to ota_0_out.bin
Unsure what to do with segment: PADDING
Unsure what to do with segment: RTC_DATA
Traceback (most recent call last):
  File "esp32_image_parser.py", line 283, in <module>
    main()
  File "esp32_image_parser.py", line 266, in main
    image2elf(dump_file, output_file, verbose)
  File "esp32_image_parser.py", line 159, in image2elf
    size = len(section_data['.iram0.vectors']['data']) + len(section_data['.iram0.text']['data'])
                                                             ~~~~~~~~~~~~^^^^^^^^^^^^^^^
KeyError: '.iram0.text'
niftic commented 6 months ago

Might get fixed by #15

helgek commented 6 months ago

It does fix the issue, thank you!

helgek commented 6 months ago

All the three fixes I needed to eventually create the .elf file are included in this version:

esp32_image_parser.zip