Module refinery.units.formats.pe.peoverlay
Expand source code Browse git
from __future__ import annotations
from refinery.units.formats.pe import OverlayUnit
class peoverlay(OverlayUnit):
"""
Return the overlay of a PE file.
Returns anything that may have been appended to the file. This does not include digital
signatures. Use `refinery.pestrip` to obtain only the body of the PE file after removing
the overlay.
"""
def process(self, data: bytearray) -> bytearray:
size = self._get_size(data)
try:
data[:size] = []
except Exception:
return data[size:]
else:
return data
Classes
class peoverlay (certificate=False, directories=False, memdump=False)-
Return the overlay of a PE file.
Returns anything that may have been appended to the file. This does not include digital signatures. Use
pestripto obtain only the body of the PE file after removing the overlay.Expand source code Browse git
class peoverlay(OverlayUnit): """ Return the overlay of a PE file. Returns anything that may have been appended to the file. This does not include digital signatures. Use `refinery.pestrip` to obtain only the body of the PE file after removing the overlay. """ def process(self, data: bytearray) -> bytearray: size = self._get_size(data) try: data[:size] = [] except Exception: return data[size:] else: return dataAncestors
Subclasses
Class variables
var reverse-
The type of the None singleton.
Inherited members
OverlayUnit:FilterEverythingRequiresactassemblecodecconsolefilterfinishhandlesis_quietis_reversibleisattylabelledleniencylog_alwayslog_debuglog_detachlog_faillog_infolog_levellog_warnloggernamenozzleoptional_dependenciesprocessreadread1required_dependenciesresetrunsourcesuperinit