Skip to content

Commit

Permalink
News 22/02/2024 10:43 -> Added multi-arch support to section_info met…
Browse files Browse the repository at this point in the history
…hod.
  • Loading branch information
CYB3RMX committed Feb 22, 2024
1 parent 6dba8c9 commit e87d9b1
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/wh1tem0cha/wh1tem0cha.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,15 @@ def section_info(self, section_name):
section_offset = binascii.hexlify(lend)

# Get section size
tmp1 = binascii.hexlify(section_buffer)[80:88]
lend = struct.pack("<I", int(tmp1, 16))
section_size = binascii.hexlify(lend)
_ = self.get_binary_info()
if self._binary_info["arch"] != "multi":
tmp1 = binascii.hexlify(section_buffer)[80:88]
lend = struct.pack("<I", int(tmp1, 16))
section_size = binascii.hexlify(lend)
else:
tmp1 = binascii.hexlify(section_buffer)[72:80]
lend = struct.pack("<I", int(tmp1, 16))
section_size = binascii.hexlify(lend)

# Return value
section_info_report = {
Expand Down

0 comments on commit e87d9b1

Please sign in to comment.