Skip to content
This repository was archived by the owner on Dec 24, 2025. It is now read-only.

Commit caeafef

Browse files
authored
Merge pull request #47 from lallouslab/ren_peutils
bugfix: idautils.peutils_t had dup definitions of the same function
2 parents bb73c36 + 8e3a5f5 commit caeafef

1 file changed

Lines changed: 7 additions & 12 deletions

File tree

python/idautils.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -735,22 +735,17 @@ def __init__(self):
735735
self.__penode = ida_netnode.netnode()
736736
self.__penode.create(peutils_t.PE_NODE)
737737

738-
imagebase = property(
739-
lambda self: self.__penode.altval(peutils_t.PE_ALT_IMAGEBASE)
740-
)
738+
imagebase = property(lambda self: self.__penode.altval(peutils_t.PE_ALT_IMAGEBASE))
739+
"""Loading address (usually pe.imagebase)"""
741740

742-
header = property(
743-
lambda self: self.__penode.altval(peutils_t.PE_ALT_PEHDR_OFF)
744-
)
741+
header_offset = property(lambda self: self.__penode.altval(peutils_t.PE_ALT_PEHDR_OFF))
742+
"""Offset of PE header"""
745743

746744
def __str__(self):
747-
return "peutils_t(imagebase=%s, header=%s)" % (hex(self.imagebase), hex(self.header))
745+
return "peutils_t(imagebase=%x, header=%x)" % (self.imagebase, self.header_offset)
748746

749-
def header(self):
750-
"""
751-
Returns the complete PE header as an instance of peheader_t (defined in the SDK).
752-
"""
753-
return self.__penode.valobj()
747+
header = lambda self: self.__penode.valobj()
748+
"""Returns the complete PE header as an instance of peheader_t (defined in the SDK)."""
754749

755750
# -----------------------------------------------------------------------
756751
cpu = _cpu()

0 commit comments

Comments
 (0)