diff --git a/api/python/lief/ART.pyi b/api/python/lief/ART.pyi index a637cda9..0f8ff965 100644 --- a/api/python/lief/ART.pyi +++ b/api/python/lief/ART.pyi @@ -60,6 +60,13 @@ class STORAGE_MODES: UNCOMPRESSED: ClassVar[STORAGE_MODES] = ... __name__: Any def __init__(self, *args, **kwargs) -> None: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... def android_version(art_version: int) -> lief.Android.ANDROID_VERSIONS: ... @overload diff --git a/api/python/lief/Android.pyi b/api/python/lief/Android.pyi index 12b3797c..66b9f9e1 100644 --- a/api/python/lief/Android.pyi +++ b/api/python/lief/Android.pyi @@ -15,6 +15,13 @@ class ANDROID_VERSIONS: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.Android.ANDROID_VERSIONS: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... diff --git a/api/python/lief/DEX.pyi b/api/python/lief/DEX.pyi index 9d3fff27..194c4300 100644 --- a/api/python/lief/DEX.pyi +++ b/api/python/lief/DEX.pyi @@ -34,6 +34,13 @@ class ACCESS_FLAGS: VOLATILE: ClassVar[ACCESS_FLAGS] = ... __name__: Any def __init__(self, *args, **kwargs) -> None: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... class Class(lief.Object): class it_fields: @@ -249,6 +256,13 @@ class MapItem(lief.Object): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.DEX.MapItem.TYPES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... def __init__(self, *args, **kwargs) -> None: ... @@ -322,6 +336,13 @@ class Type(lief.Object): VOID_T: ClassVar[Type.PRIMITIVES] = ... __name__: Any def __init__(self, *args, **kwargs) -> None: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... class TYPES: ARRAY: ClassVar[Type.TYPES] = ... @@ -330,6 +351,13 @@ class Type(lief.Object): UNKNOWN: ClassVar[Type.TYPES] = ... __name__: Any def __init__(self, *args, **kwargs) -> None: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... def __init__(self, *args, **kwargs) -> None: ... @staticmethod def pretty_name(primitive: lief.DEX.Type.PRIMITIVES) -> str: ... diff --git a/api/python/lief/ELF.pyi b/api/python/lief/ELF.pyi index d0a030d5..ce769bce 100644 --- a/api/python/lief/ELF.pyi +++ b/api/python/lief/ELF.pyi @@ -33,6 +33,13 @@ class AArch64Feature(NoteGnuProperty.Property): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.AArch64Feature.FEATURE: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... def __init__(self, *args, **kwargs) -> None: ... @@ -222,6 +229,13 @@ class ARCH: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.ARCH: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -240,18 +254,41 @@ class ARM_EFLAGS: def from_value(arg: int, /) -> lief.ELF.ARM_EFLAGS: ... def __abs__(self) -> Any: ... def __add__(self, other) -> Any: ... + @overload + def __and__(self, arg: int, /) -> int: ... + @overload + def __and__(self, arg: lief.ELF.ARM_EFLAGS, /) -> int: ... def __floordiv__(self, other) -> Any: ... + def __ge__(self, arg: int, /) -> bool: ... + def __gt__(self, arg: int, /) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __invert__(self) -> int: ... + def __le__(self, arg: int, /) -> bool: ... def __lshift__(self, other) -> Any: ... + def __lt__(self, arg: int, /) -> bool: ... def __mul__(self, other) -> Any: ... def __neg__(self) -> Any: ... + @overload + def __or__(self, arg: int, /) -> int: ... + @overload + def __or__(self, arg: lief.ELF.ARM_EFLAGS, /) -> lief.ELF.ARM_EFLAGS: ... def __radd__(self, other) -> Any: ... + def __rand__(self, arg: int, /) -> int: ... def __rfloordiv__(self, other) -> Any: ... def __rlshift__(self, other) -> Any: ... def __rmul__(self, other) -> Any: ... + def __ror__(self, arg: int, /) -> int: ... def __rrshift__(self, other) -> Any: ... def __rshift__(self, other) -> Any: ... def __rsub__(self, other) -> Any: ... + def __rxor__(self, arg: int, /) -> int: ... def __sub__(self, other) -> Any: ... + @overload + def __xor__(self, arg: int, /) -> int: ... + @overload + def __xor__(self, arg: lief.ELF.ARM_EFLAGS, /) -> int: ... @property def value(self) -> int: ... @@ -270,6 +307,13 @@ class Binary(lief.Binary): SEGMENT_GAP: ClassVar[Binary.PHDR_RELOC] = ... __name__: Any def __init__(self, *args, **kwargs) -> None: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... class it_dyn_static_symbols: def __init__(self, *args, **kwargs) -> None: ... @@ -610,6 +654,13 @@ class CoreAuxv(Note): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.CoreAuxv.TYPE: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... def __init__(self, *args, **kwargs) -> None: ... @@ -730,6 +781,13 @@ class CorePrStatus(Note): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.CorePrStatus.Registers.AARCH64: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -755,6 +813,13 @@ class CorePrStatus(Note): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.CorePrStatus.Registers.ARM: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -780,6 +845,13 @@ class CorePrStatus(Note): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.CorePrStatus.Registers.X86: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -809,6 +881,13 @@ class CorePrStatus(Note): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.CorePrStatus.Registers.X86_64: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... def __init__(self, *args, **kwargs) -> None: ... @@ -902,18 +981,41 @@ class DYNAMIC_FLAGS: def from_value(arg: int, /) -> lief.ELF.DYNAMIC_FLAGS: ... def __abs__(self) -> Any: ... def __add__(self, other) -> Any: ... + @overload + def __and__(self, arg: int, /) -> int: ... + @overload + def __and__(self, arg: lief.ELF.DYNAMIC_FLAGS, /) -> int: ... def __floordiv__(self, other) -> Any: ... + def __ge__(self, arg: int, /) -> bool: ... + def __gt__(self, arg: int, /) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __invert__(self) -> int: ... + def __le__(self, arg: int, /) -> bool: ... def __lshift__(self, other) -> Any: ... + def __lt__(self, arg: int, /) -> bool: ... def __mul__(self, other) -> Any: ... def __neg__(self) -> Any: ... + @overload + def __or__(self, arg: int, /) -> int: ... + @overload + def __or__(self, arg: lief.ELF.DYNAMIC_FLAGS, /) -> lief.ELF.DYNAMIC_FLAGS: ... def __radd__(self, other) -> Any: ... + def __rand__(self, arg: int, /) -> int: ... def __rfloordiv__(self, other) -> Any: ... def __rlshift__(self, other) -> Any: ... def __rmul__(self, other) -> Any: ... + def __ror__(self, arg: int, /) -> int: ... def __rrshift__(self, other) -> Any: ... def __rshift__(self, other) -> Any: ... def __rsub__(self, other) -> Any: ... + def __rxor__(self, arg: int, /) -> int: ... def __sub__(self, other) -> Any: ... + @overload + def __xor__(self, arg: int, /) -> int: ... + @overload + def __xor__(self, arg: lief.ELF.DYNAMIC_FLAGS, /) -> int: ... @property def value(self) -> int: ... @@ -951,18 +1053,41 @@ class DYNAMIC_FLAGS_1: def from_value(arg: int, /) -> lief.ELF.DYNAMIC_FLAGS_1: ... def __abs__(self) -> Any: ... def __add__(self, other) -> Any: ... + @overload + def __and__(self, arg: int, /) -> int: ... + @overload + def __and__(self, arg: lief.ELF.DYNAMIC_FLAGS_1, /) -> int: ... def __floordiv__(self, other) -> Any: ... + def __ge__(self, arg: int, /) -> bool: ... + def __gt__(self, arg: int, /) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __invert__(self) -> int: ... + def __le__(self, arg: int, /) -> bool: ... def __lshift__(self, other) -> Any: ... + def __lt__(self, arg: int, /) -> bool: ... def __mul__(self, other) -> Any: ... def __neg__(self) -> Any: ... + @overload + def __or__(self, arg: int, /) -> int: ... + @overload + def __or__(self, arg: lief.ELF.DYNAMIC_FLAGS_1, /) -> lief.ELF.DYNAMIC_FLAGS_1: ... def __radd__(self, other) -> Any: ... + def __rand__(self, arg: int, /) -> int: ... def __rfloordiv__(self, other) -> Any: ... def __rlshift__(self, other) -> Any: ... def __rmul__(self, other) -> Any: ... + def __ror__(self, arg: int, /) -> int: ... def __rrshift__(self, other) -> Any: ... def __rshift__(self, other) -> Any: ... def __rsub__(self, other) -> Any: ... + def __rxor__(self, arg: int, /) -> int: ... def __sub__(self, other) -> Any: ... + @overload + def __xor__(self, arg: int, /) -> int: ... + @overload + def __xor__(self, arg: lief.ELF.DYNAMIC_FLAGS_1, /) -> int: ... @property def value(self) -> int: ... @@ -1072,6 +1197,13 @@ class DYNAMIC_TAGS: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.DYNAMIC_TAGS: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -1084,6 +1216,13 @@ class DYNSYM_COUNT_METHODS: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.DYNSYM_COUNT_METHODS: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -1185,6 +1324,13 @@ class ELF_CLASS: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.ELF_CLASS: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -1196,6 +1342,13 @@ class ELF_DATA: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.ELF_DATA: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -1211,6 +1364,13 @@ class E_TYPE: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.E_TYPE: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -1256,18 +1416,41 @@ class HEXAGON_EFLAGS: def from_value(arg: int, /) -> lief.ELF.HEXAGON_EFLAGS: ... def __abs__(self) -> Any: ... def __add__(self, other) -> Any: ... + @overload + def __and__(self, arg: int, /) -> int: ... + @overload + def __and__(self, arg: lief.ELF.HEXAGON_EFLAGS, /) -> int: ... def __floordiv__(self, other) -> Any: ... + def __ge__(self, arg: int, /) -> bool: ... + def __gt__(self, arg: int, /) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __invert__(self) -> int: ... + def __le__(self, arg: int, /) -> bool: ... def __lshift__(self, other) -> Any: ... + def __lt__(self, arg: int, /) -> bool: ... def __mul__(self, other) -> Any: ... def __neg__(self) -> Any: ... + @overload + def __or__(self, arg: int, /) -> int: ... + @overload + def __or__(self, arg: lief.ELF.HEXAGON_EFLAGS, /) -> lief.ELF.HEXAGON_EFLAGS: ... def __radd__(self, other) -> Any: ... + def __rand__(self, arg: int, /) -> int: ... def __rfloordiv__(self, other) -> Any: ... def __rlshift__(self, other) -> Any: ... def __rmul__(self, other) -> Any: ... + def __ror__(self, arg: int, /) -> int: ... def __rrshift__(self, other) -> Any: ... def __rshift__(self, other) -> Any: ... def __rsub__(self, other) -> Any: ... + def __rxor__(self, arg: int, /) -> int: ... def __sub__(self, other) -> Any: ... + @overload + def __xor__(self, arg: int, /) -> int: ... + @overload + def __xor__(self, arg: lief.ELF.HEXAGON_EFLAGS, /) -> int: ... @property def value(self) -> int: ... @@ -1329,6 +1512,13 @@ class IDENTITY: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.IDENTITY: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -1342,18 +1532,41 @@ class LOONGARCH_EFLAGS: def from_value(arg: int, /) -> lief.ELF.LOONGARCH_EFLAGS: ... def __abs__(self) -> Any: ... def __add__(self, other) -> Any: ... + @overload + def __and__(self, arg: int, /) -> int: ... + @overload + def __and__(self, arg: lief.ELF.LOONGARCH_EFLAGS, /) -> int: ... def __floordiv__(self, other) -> Any: ... + def __ge__(self, arg: int, /) -> bool: ... + def __gt__(self, arg: int, /) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __invert__(self) -> int: ... + def __le__(self, arg: int, /) -> bool: ... def __lshift__(self, other) -> Any: ... + def __lt__(self, arg: int, /) -> bool: ... def __mul__(self, other) -> Any: ... def __neg__(self) -> Any: ... + @overload + def __or__(self, arg: int, /) -> int: ... + @overload + def __or__(self, arg: lief.ELF.LOONGARCH_EFLAGS, /) -> lief.ELF.LOONGARCH_EFLAGS: ... def __radd__(self, other) -> Any: ... + def __rand__(self, arg: int, /) -> int: ... def __rfloordiv__(self, other) -> Any: ... def __rlshift__(self, other) -> Any: ... def __rmul__(self, other) -> Any: ... + def __ror__(self, arg: int, /) -> int: ... def __rrshift__(self, other) -> Any: ... def __rshift__(self, other) -> Any: ... def __rsub__(self, other) -> Any: ... + def __rxor__(self, arg: int, /) -> int: ... def __sub__(self, other) -> Any: ... + @overload + def __xor__(self, arg: int, /) -> int: ... + @overload + def __xor__(self, arg: lief.ELF.LOONGARCH_EFLAGS, /) -> int: ... @property def value(self) -> int: ... @@ -1407,18 +1620,41 @@ class MIPS_EFLAGS: def from_value(arg: int, /) -> lief.ELF.MIPS_EFLAGS: ... def __abs__(self) -> Any: ... def __add__(self, other) -> Any: ... + @overload + def __and__(self, arg: int, /) -> int: ... + @overload + def __and__(self, arg: lief.ELF.MIPS_EFLAGS, /) -> int: ... def __floordiv__(self, other) -> Any: ... + def __ge__(self, arg: int, /) -> bool: ... + def __gt__(self, arg: int, /) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __invert__(self) -> int: ... + def __le__(self, arg: int, /) -> bool: ... def __lshift__(self, other) -> Any: ... + def __lt__(self, arg: int, /) -> bool: ... def __mul__(self, other) -> Any: ... def __neg__(self) -> Any: ... + @overload + def __or__(self, arg: int, /) -> int: ... + @overload + def __or__(self, arg: lief.ELF.MIPS_EFLAGS, /) -> lief.ELF.MIPS_EFLAGS: ... def __radd__(self, other) -> Any: ... + def __rand__(self, arg: int, /) -> int: ... def __rfloordiv__(self, other) -> Any: ... def __rlshift__(self, other) -> Any: ... def __rmul__(self, other) -> Any: ... + def __ror__(self, arg: int, /) -> int: ... def __rrshift__(self, other) -> Any: ... def __rshift__(self, other) -> Any: ... def __rsub__(self, other) -> Any: ... + def __rxor__(self, arg: int, /) -> int: ... def __sub__(self, other) -> Any: ... + @overload + def __xor__(self, arg: int, /) -> int: ... + @overload + def __xor__(self, arg: lief.ELF.MIPS_EFLAGS, /) -> int: ... @property def value(self) -> int: ... @@ -1471,6 +1707,13 @@ class Note(lief.Object): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.Note.TYPE: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... description: memoryview @@ -1506,6 +1749,13 @@ class NoteAbi(Note): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.NoteAbi.ABI: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... def __init__(self, *args, **kwargs) -> None: ... @@ -1529,6 +1779,13 @@ class NoteGnuProperty(Note): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.NoteGnuProperty.Property.TYPE: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... def __init__(self, *args, **kwargs) -> None: ... @@ -1570,6 +1827,13 @@ class OS_ABI: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.OS_ABI: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -1581,18 +1845,41 @@ class PPC64_EFLAGS: def from_value(arg: int, /) -> lief.ELF.PPC64_EFLAGS: ... def __abs__(self) -> Any: ... def __add__(self, other) -> Any: ... + @overload + def __and__(self, arg: int, /) -> int: ... + @overload + def __and__(self, arg: lief.ELF.PPC64_EFLAGS, /) -> int: ... def __floordiv__(self, other) -> Any: ... + def __ge__(self, arg: int, /) -> bool: ... + def __gt__(self, arg: int, /) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __invert__(self) -> int: ... + def __le__(self, arg: int, /) -> bool: ... def __lshift__(self, other) -> Any: ... + def __lt__(self, arg: int, /) -> bool: ... def __mul__(self, other) -> Any: ... def __neg__(self) -> Any: ... + @overload + def __or__(self, arg: int, /) -> int: ... + @overload + def __or__(self, arg: lief.ELF.PPC64_EFLAGS, /) -> lief.ELF.PPC64_EFLAGS: ... def __radd__(self, other) -> Any: ... + def __rand__(self, arg: int, /) -> int: ... def __rfloordiv__(self, other) -> Any: ... def __rlshift__(self, other) -> Any: ... def __rmul__(self, other) -> Any: ... + def __ror__(self, arg: int, /) -> int: ... def __rrshift__(self, other) -> Any: ... def __rshift__(self, other) -> Any: ... def __rsub__(self, other) -> Any: ... + def __rxor__(self, arg: int, /) -> int: ... def __sub__(self, other) -> Any: ... + @overload + def __xor__(self, arg: int, /) -> int: ... + @overload + def __xor__(self, arg: lief.ELF.PPC64_EFLAGS, /) -> int: ... @property def value(self) -> int: ... @@ -1736,6 +2023,13 @@ class RELOCATION_AARCH64: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.RELOCATION_AARCH64: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -1882,6 +2176,13 @@ class RELOCATION_ARM: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.RELOCATION_ARM: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -1979,6 +2280,13 @@ class RELOCATION_LOONGARCH: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.RELOCATION_LOONGARCH: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -2096,6 +2404,13 @@ class RELOCATION_MIPS: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.RELOCATION_MIPS: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -2161,6 +2476,13 @@ class RELOCATION_PPC: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.RELOCATION_PPC: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -2253,6 +2575,13 @@ class RELOCATION_PPC64: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.RELOCATION_PPC64: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -2265,6 +2594,13 @@ class RELOCATION_PURPOSES: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.RELOCATION_PURPOSES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -2316,6 +2652,13 @@ class RELOCATION_X86_64: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.RELOCATION_X86_64: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -2365,6 +2708,13 @@ class RELOCATION_i386: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.RELOCATION_i386: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -2417,18 +2767,41 @@ class SECTION_FLAGS: def from_value(arg: int, /) -> lief.ELF.SECTION_FLAGS: ... def __abs__(self) -> Any: ... def __add__(self, other) -> Any: ... + @overload + def __and__(self, arg: int, /) -> int: ... + @overload + def __and__(self, arg: lief.ELF.SECTION_FLAGS, /) -> int: ... def __floordiv__(self, other) -> Any: ... + def __ge__(self, arg: int, /) -> bool: ... + def __gt__(self, arg: int, /) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __invert__(self) -> int: ... + def __le__(self, arg: int, /) -> bool: ... def __lshift__(self, other) -> Any: ... + def __lt__(self, arg: int, /) -> bool: ... def __mul__(self, other) -> Any: ... def __neg__(self) -> Any: ... + @overload + def __or__(self, arg: int, /) -> int: ... + @overload + def __or__(self, arg: lief.ELF.SECTION_FLAGS, /) -> lief.ELF.SECTION_FLAGS: ... def __radd__(self, other) -> Any: ... + def __rand__(self, arg: int, /) -> int: ... def __rfloordiv__(self, other) -> Any: ... def __rlshift__(self, other) -> Any: ... def __rmul__(self, other) -> Any: ... + def __ror__(self, arg: int, /) -> int: ... def __rrshift__(self, other) -> Any: ... def __rshift__(self, other) -> Any: ... def __rsub__(self, other) -> Any: ... + def __rxor__(self, arg: int, /) -> int: ... def __sub__(self, other) -> Any: ... + @overload + def __xor__(self, arg: int, /) -> int: ... + @overload + def __xor__(self, arg: lief.ELF.SECTION_FLAGS, /) -> int: ... @property def value(self) -> int: ... @@ -2474,6 +2847,13 @@ class SECTION_TYPES: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.SECTION_TYPES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -2488,18 +2868,41 @@ class SEGMENT_FLAGS: def from_value(arg: int, /) -> lief.ELF.SEGMENT_FLAGS: ... def __abs__(self) -> Any: ... def __add__(self, other) -> Any: ... + @overload + def __and__(self, arg: int, /) -> int: ... + @overload + def __and__(self, arg: lief.ELF.SEGMENT_FLAGS, /) -> int: ... def __floordiv__(self, other) -> Any: ... + def __ge__(self, arg: int, /) -> bool: ... + def __gt__(self, arg: int, /) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __invert__(self) -> int: ... + def __le__(self, arg: int, /) -> bool: ... def __lshift__(self, other) -> Any: ... + def __lt__(self, arg: int, /) -> bool: ... def __mul__(self, other) -> Any: ... def __neg__(self) -> Any: ... + @overload + def __or__(self, arg: int, /) -> int: ... + @overload + def __or__(self, arg: lief.ELF.SEGMENT_FLAGS, /) -> lief.ELF.SEGMENT_FLAGS: ... def __radd__(self, other) -> Any: ... + def __rand__(self, arg: int, /) -> int: ... def __rfloordiv__(self, other) -> Any: ... def __rlshift__(self, other) -> Any: ... def __rmul__(self, other) -> Any: ... + def __ror__(self, arg: int, /) -> int: ... def __rrshift__(self, other) -> Any: ... def __rshift__(self, other) -> Any: ... def __rsub__(self, other) -> Any: ... + def __rxor__(self, arg: int, /) -> int: ... def __sub__(self, other) -> Any: ... + @overload + def __xor__(self, arg: int, /) -> int: ... + @overload + def __xor__(self, arg: lief.ELF.SEGMENT_FLAGS, /) -> int: ... @property def value(self) -> int: ... @@ -2523,6 +2926,13 @@ class SEGMENT_TYPES: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.SEGMENT_TYPES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -2535,6 +2945,13 @@ class SYMBOL_BINDINGS: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.SYMBOL_BINDINGS: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -2547,6 +2964,13 @@ class SYMBOL_SECTION_INDEX: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.SYMBOL_SECTION_INDEX: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -2563,6 +2987,13 @@ class SYMBOL_TYPES: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.SYMBOL_TYPES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -2575,6 +3006,13 @@ class SYMBOL_VISIBILITY: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.SYMBOL_VISIBILITY: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -2726,6 +3164,8 @@ class SymbolVersionDefinition(lief.Object): def __init__(self, *args, **kwargs) -> None: ... @property def auxiliary_symbols(self) -> lief.ELF.SymbolVersionDefinition.it_version_aux: ... + @property + def ndx(self) -> int: ... class SymbolVersionRequirement(lief.Object): class it_aux_requirement: @@ -2757,6 +3197,13 @@ class VERSION: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.VERSION: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -2783,6 +3230,13 @@ class X86Features(NoteGnuProperty.Property): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.X86Features.FEATURE: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -2794,6 +3248,13 @@ class X86Features(NoteGnuProperty.Property): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.X86Features.FLAG: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... def __init__(self, *args, **kwargs) -> None: ... @@ -2809,6 +3270,13 @@ class X86ISA(NoteGnuProperty.Property): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.X86ISA.FLAG: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -2850,6 +3318,13 @@ class X86ISA(NoteGnuProperty.Property): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ELF.X86ISA.ISA: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... def __init__(self, *args, **kwargs) -> None: ... diff --git a/api/python/lief/MachO.pyi b/api/python/lief/MachO.pyi index 5ce9db8b..e763bc9f 100644 --- a/api/python/lief/MachO.pyi +++ b/api/python/lief/MachO.pyi @@ -33,6 +33,13 @@ class ARM64_RELOCATION: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.ARM64_RELOCATION: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -51,6 +58,13 @@ class ARM_RELOCATION: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.ARM_RELOCATION: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -63,6 +77,13 @@ class BINDING_CLASS: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.BINDING_CLASS: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -85,6 +106,13 @@ class BIND_OPCODES: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.BIND_OPCODES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -96,6 +124,13 @@ class BIND_SPECIAL_DYLIB: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.BIND_SPECIAL_DYLIB: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -107,6 +142,13 @@ class BIND_TYPES: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.BIND_TYPES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -400,6 +442,13 @@ class BuildToolVersion(lief.Object): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.BuildToolVersion.TOOLS: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... def __init__(self, *args, **kwargs) -> None: ... @@ -419,6 +468,13 @@ class BuildVersion(LoadCommand): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.BuildVersion.PLATFORMS: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... minos: list[int] @@ -461,6 +517,13 @@ class CPU_TYPES: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.CPU_TYPES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -496,6 +559,13 @@ class DYLD_CHAINED_FORMAT: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.DYLD_CHAINED_FORMAT: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -516,6 +586,13 @@ class DYLD_CHAINED_PTR_FORMAT: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.DYLD_CHAINED_PTR_FORMAT: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -531,6 +608,13 @@ class DataCodeEntry(lief.Object): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.DataCodeEntry.TYPES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... length: int @@ -727,6 +811,13 @@ class EXPORT_SYMBOL_FLAGS: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.EXPORT_SYMBOL_FLAGS: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -738,6 +829,13 @@ class EXPORT_SYMBOL_KINDS: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.EXPORT_SYMBOL_KINDS: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -783,6 +881,13 @@ class FILE_TYPES: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.FILE_TYPES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -852,6 +957,13 @@ class HEADER_FLAGS: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.HEADER_FLAGS: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -933,6 +1045,13 @@ class LOAD_COMMAND_TYPES: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.LOAD_COMMAND_TYPES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -964,6 +1083,13 @@ class MACHO_TYPES: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.MACHO_TYPES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -993,6 +1119,13 @@ class PPC_RELOCATION: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.PPC_RELOCATION: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -1022,6 +1155,13 @@ class REBASE_OPCODES: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.REBASE_OPCODES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -1033,6 +1173,13 @@ class REBASE_TYPES: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.REBASE_TYPES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -1045,6 +1192,13 @@ class RELOCATION_ORIGINS: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.RELOCATION_ORIGINS: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -1076,6 +1230,10 @@ class Relocation(lief.Relocation): class RelocationDyld(Relocation): def __init__(self, *args, **kwargs) -> None: ... + def __ge__(self, arg: lief.MachO.RelocationDyld, /) -> bool: ... + def __gt__(self, arg: lief.MachO.RelocationDyld, /) -> bool: ... + def __le__(self, arg: lief.MachO.RelocationDyld, /) -> bool: ... + def __lt__(self, arg: lief.MachO.RelocationDyld, /) -> bool: ... class RelocationFixup(Relocation): target: int @@ -1102,6 +1260,13 @@ class SECTION_FLAGS: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.SECTION_FLAGS: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -1132,6 +1297,13 @@ class SECTION_TYPES: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.SECTION_TYPES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -1143,6 +1315,13 @@ class SYMBOL_ORIGINS: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.SYMBOL_ORIGINS: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -1251,6 +1430,13 @@ class Symbol(lief.Symbol): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.Symbol.CATEGORY: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... description: int @@ -1313,6 +1499,13 @@ class VM_PROTECTIONS: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.VM_PROTECTIONS: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -1336,6 +1529,13 @@ class X86_64_RELOCATION: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.X86_64_RELOCATION: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -1350,6 +1550,13 @@ class X86_RELOCATION: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MachO.X86_RELOCATION: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... diff --git a/api/python/lief/OAT.pyi b/api/python/lief/OAT.pyi index ad556e37..485c1127 100644 --- a/api/python/lief/OAT.pyi +++ b/api/python/lief/OAT.pyi @@ -113,6 +113,13 @@ class HEADER_KEYS: PIC: ClassVar[HEADER_KEYS] = ... __name__: Any def __init__(self, *args, **kwargs) -> None: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... class Header(lief.Object): class element_t: @@ -185,6 +192,13 @@ class INSTRUCTION_SETS: X86_64: ClassVar[INSTRUCTION_SETS] = ... __name__: Any def __init__(self, *args, **kwargs) -> None: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... class Method(lief.Object): quick_code: list[int] @@ -218,6 +232,13 @@ class OAT_CLASS_STATUS: VERIFYING_AT_RUNTIME: ClassVar[OAT_CLASS_STATUS] = ... __name__: Any def __init__(self, *args, **kwargs) -> None: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... class OAT_CLASS_TYPES: ALL_COMPILED: ClassVar[OAT_CLASS_TYPES] = ... @@ -225,6 +246,13 @@ class OAT_CLASS_TYPES: SOME_COMPILED: ClassVar[OAT_CLASS_TYPES] = ... __name__: Any def __init__(self, *args, **kwargs) -> None: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... def android_version(arg: int, /) -> lief.Android.ANDROID_VERSIONS: ... @overload diff --git a/api/python/lief/PE.pyi b/api/python/lief/PE.pyi index 86d3351c..de088185 100644 --- a/api/python/lief/PE.pyi +++ b/api/python/lief/PE.pyi @@ -44,18 +44,41 @@ class ACCELERATOR_FLAGS: def from_value(arg: int, /) -> lief.PE.ACCELERATOR_FLAGS: ... def __abs__(self) -> Any: ... def __add__(self, other) -> Any: ... + @overload + def __and__(self, arg: int, /) -> int: ... + @overload + def __and__(self, arg: lief.PE.ACCELERATOR_FLAGS, /) -> int: ... def __floordiv__(self, other) -> Any: ... + def __ge__(self, arg: int, /) -> bool: ... + def __gt__(self, arg: int, /) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __invert__(self) -> int: ... + def __le__(self, arg: int, /) -> bool: ... def __lshift__(self, other) -> Any: ... + def __lt__(self, arg: int, /) -> bool: ... def __mul__(self, other) -> Any: ... def __neg__(self) -> Any: ... + @overload + def __or__(self, arg: int, /) -> int: ... + @overload + def __or__(self, arg: lief.PE.ACCELERATOR_FLAGS, /) -> lief.PE.ACCELERATOR_FLAGS: ... def __radd__(self, other) -> Any: ... + def __rand__(self, arg: int, /) -> int: ... def __rfloordiv__(self, other) -> Any: ... def __rlshift__(self, other) -> Any: ... def __rmul__(self, other) -> Any: ... + def __ror__(self, arg: int, /) -> int: ... def __rrshift__(self, other) -> Any: ... def __rshift__(self, other) -> Any: ... def __rsub__(self, other) -> Any: ... + def __rxor__(self, arg: int, /) -> int: ... def __sub__(self, other) -> Any: ... + @overload + def __xor__(self, arg: int, /) -> int: ... + @overload + def __xor__(self, arg: lief.PE.ACCELERATOR_FLAGS, /) -> int: ... @property def value(self) -> int: ... @@ -238,6 +261,13 @@ class ACCELERATOR_VK_CODES: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.ACCELERATOR_VK_CODES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -266,6 +296,13 @@ class ALGORITHMS: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.ALGORITHMS: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -286,6 +323,13 @@ class Attribute(lief.Object): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.Attribute.TYPE: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... def __init__(self, *args, **kwargs) -> None: ... @@ -609,6 +653,13 @@ class CODE_PAGES: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.CODE_PAGES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -630,6 +681,13 @@ class CodeView(Debug): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.CodeView.SIGNATURES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @overload @@ -658,6 +716,10 @@ class ContentInfo(lief.Object): @property def content_type(self) -> str: ... @property + def digest(self) -> bytes: ... + @property + def digest_algorithm(self) -> lief.PE.ALGORITHMS: ... + @property def value(self) -> lief.PE.ContentInfo.Content: ... class ContentType(Attribute): @@ -685,6 +747,13 @@ class DIALOG_BOX_STYLES: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.DIALOG_BOX_STYLES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -711,6 +780,13 @@ class DataDirectory(lief.Object): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.DataDirectory.TYPES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... rva: int @@ -748,6 +824,13 @@ class Debug(lief.Object): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.Debug.TYPES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... addressof_rawdata: int @@ -843,6 +926,13 @@ class EXTENDED_WINDOW_STYLES: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.EXTENDED_WINDOW_STYLES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -892,6 +982,13 @@ class FIXED_VERSION_FILE_FLAGS: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.FIXED_VERSION_FILE_FLAGS: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -915,6 +1012,13 @@ class FIXED_VERSION_FILE_SUB_TYPES: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.FIXED_VERSION_FILE_SUB_TYPES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -930,6 +1034,13 @@ class FIXED_VERSION_FILE_TYPES: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.FIXED_VERSION_FILE_TYPES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -952,6 +1063,13 @@ class FIXED_VERSION_OS: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.FIXED_VERSION_OS: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -988,18 +1106,41 @@ class Header(lief.Object): def from_value(arg: int, /) -> lief.PE.Header.CHARACTERISTICS: ... def __abs__(self) -> Any: ... def __add__(self, other) -> Any: ... + @overload + def __and__(self, arg: int, /) -> int: ... + @overload + def __and__(self, arg: lief.PE.Header.CHARACTERISTICS, /) -> int: ... def __floordiv__(self, other) -> Any: ... + def __ge__(self, arg: int, /) -> bool: ... + def __gt__(self, arg: int, /) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __invert__(self) -> int: ... + def __le__(self, arg: int, /) -> bool: ... def __lshift__(self, other) -> Any: ... + def __lt__(self, arg: int, /) -> bool: ... def __mul__(self, other) -> Any: ... def __neg__(self) -> Any: ... + @overload + def __or__(self, arg: int, /) -> int: ... + @overload + def __or__(self, arg: lief.PE.Header.CHARACTERISTICS, /) -> lief.PE.Header.CHARACTERISTICS: ... def __radd__(self, other) -> Any: ... + def __rand__(self, arg: int, /) -> int: ... def __rfloordiv__(self, other) -> Any: ... def __rlshift__(self, other) -> Any: ... def __rmul__(self, other) -> Any: ... + def __ror__(self, arg: int, /) -> int: ... def __rrshift__(self, other) -> Any: ... def __rshift__(self, other) -> Any: ... def __rsub__(self, other) -> Any: ... + def __rxor__(self, arg: int, /) -> int: ... def __sub__(self, other) -> Any: ... + @overload + def __xor__(self, arg: int, /) -> int: ... + @overload + def __xor__(self, arg: lief.PE.Header.CHARACTERISTICS, /) -> int: ... @property def value(self) -> int: ... @@ -1030,6 +1171,13 @@ class Header(lief.Object): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.Header.MACHINE_TYPES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... characteristics: int @@ -1057,6 +1205,13 @@ class IMPHASH_MODE: VT: ClassVar[IMPHASH_MODE] = ... __name__: Any def __init__(self, *args, **kwargs) -> None: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... class Import(lief.Object): class it_entries: @@ -1142,6 +1297,13 @@ class LoadConfiguration(lief.Object): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.LoadConfiguration.VERSION: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... characteristics: int @@ -1199,18 +1361,41 @@ class LoadConfigurationV1(LoadConfigurationV0): def from_value(arg: int, /) -> lief.PE.LoadConfigurationV1.IMAGE_GUARD: ... def __abs__(self) -> Any: ... def __add__(self, other) -> Any: ... + @overload + def __and__(self, arg: int, /) -> int: ... + @overload + def __and__(self, arg: lief.PE.LoadConfigurationV1.IMAGE_GUARD, /) -> int: ... def __floordiv__(self, other) -> Any: ... + def __ge__(self, arg: int, /) -> bool: ... + def __gt__(self, arg: int, /) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __invert__(self) -> int: ... + def __le__(self, arg: int, /) -> bool: ... def __lshift__(self, other) -> Any: ... + def __lt__(self, arg: int, /) -> bool: ... def __mul__(self, other) -> Any: ... def __neg__(self) -> Any: ... + @overload + def __or__(self, arg: int, /) -> int: ... + @overload + def __or__(self, arg: lief.PE.LoadConfigurationV1.IMAGE_GUARD, /) -> lief.PE.LoadConfigurationV1.IMAGE_GUARD: ... def __radd__(self, other) -> Any: ... + def __rand__(self, arg: int, /) -> int: ... def __rfloordiv__(self, other) -> Any: ... def __rlshift__(self, other) -> Any: ... def __rmul__(self, other) -> Any: ... + def __ror__(self, arg: int, /) -> int: ... def __rrshift__(self, other) -> Any: ... def __rshift__(self, other) -> Any: ... def __rsub__(self, other) -> Any: ... + def __rxor__(self, arg: int, /) -> int: ... def __sub__(self, other) -> Any: ... + @overload + def __xor__(self, arg: int, /) -> int: ... + @overload + def __xor__(self, arg: lief.PE.LoadConfigurationV1.IMAGE_GUARD, /) -> int: ... @property def value(self) -> int: ... guard_cf_check_function_pointer: int @@ -1318,18 +1503,41 @@ class OptionalHeader(lief.Object): def from_value(arg: int, /) -> lief.PE.OptionalHeader.DLL_CHARACTERISTICS: ... def __abs__(self) -> Any: ... def __add__(self, other) -> Any: ... + @overload + def __and__(self, arg: int, /) -> int: ... + @overload + def __and__(self, arg: lief.PE.OptionalHeader.DLL_CHARACTERISTICS, /) -> int: ... def __floordiv__(self, other) -> Any: ... + def __ge__(self, arg: int, /) -> bool: ... + def __gt__(self, arg: int, /) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __invert__(self) -> int: ... + def __le__(self, arg: int, /) -> bool: ... def __lshift__(self, other) -> Any: ... + def __lt__(self, arg: int, /) -> bool: ... def __mul__(self, other) -> Any: ... def __neg__(self) -> Any: ... + @overload + def __or__(self, arg: int, /) -> int: ... + @overload + def __or__(self, arg: lief.PE.OptionalHeader.DLL_CHARACTERISTICS, /) -> lief.PE.OptionalHeader.DLL_CHARACTERISTICS: ... def __radd__(self, other) -> Any: ... + def __rand__(self, arg: int, /) -> int: ... def __rfloordiv__(self, other) -> Any: ... def __rlshift__(self, other) -> Any: ... def __rmul__(self, other) -> Any: ... + def __ror__(self, arg: int, /) -> int: ... def __rrshift__(self, other) -> Any: ... def __rshift__(self, other) -> Any: ... def __rsub__(self, other) -> Any: ... + def __rxor__(self, arg: int, /) -> int: ... def __sub__(self, other) -> Any: ... + @overload + def __xor__(self, arg: int, /) -> int: ... + @overload + def __xor__(self, arg: lief.PE.OptionalHeader.DLL_CHARACTERISTICS, /) -> int: ... @property def value(self) -> int: ... @@ -1352,6 +1560,13 @@ class OptionalHeader(lief.Object): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.OptionalHeader.SUBSYSTEM: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... addressof_entrypoint: int @@ -1406,6 +1621,13 @@ class PE_TYPE: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.PE_TYPE: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -1449,6 +1671,13 @@ class Pogo(Debug): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.Pogo.SIGNATURES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -1579,6 +1808,13 @@ class RESOURCE_LANGS: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.RESOURCE_LANGS: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -1623,6 +1859,13 @@ class RelocationEntry(lief.Relocation): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.RelocationEntry.BASE_TYPES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... data: int @@ -1861,6 +2104,13 @@ class ResourcesManager(lief.Object): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.ResourcesManager.TYPE: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -1996,6 +2246,13 @@ class SECTION_TYPES: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.SECTION_TYPES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -2020,6 +2277,13 @@ class SYMBOL_BASE_TYPES: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.SYMBOL_BASE_TYPES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -2033,6 +2297,13 @@ class SYMBOL_COMPLEX_TYPES: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.SYMBOL_COMPLEX_TYPES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -2044,6 +2315,13 @@ class SYMBOL_SECTION_NUMBER: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.SYMBOL_SECTION_NUMBER: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -2076,6 +2354,13 @@ class SYMBOL_STORAGE_CLASS: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.SYMBOL_STORAGE_CLASS: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -2122,18 +2407,41 @@ class Section(lief.Section): def from_value(arg: int, /) -> lief.PE.Section.CHARACTERISTICS: ... def __abs__(self) -> Any: ... def __add__(self, other) -> Any: ... + @overload + def __and__(self, arg: int, /) -> int: ... + @overload + def __and__(self, arg: lief.PE.Section.CHARACTERISTICS, /) -> int: ... def __floordiv__(self, other) -> Any: ... + def __ge__(self, arg: int, /) -> bool: ... + def __gt__(self, arg: int, /) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __invert__(self) -> int: ... + def __le__(self, arg: int, /) -> bool: ... def __lshift__(self, other) -> Any: ... + def __lt__(self, arg: int, /) -> bool: ... def __mul__(self, other) -> Any: ... def __neg__(self) -> Any: ... + @overload + def __or__(self, arg: int, /) -> int: ... + @overload + def __or__(self, arg: lief.PE.Section.CHARACTERISTICS, /) -> lief.PE.Section.CHARACTERISTICS: ... def __radd__(self, other) -> Any: ... + def __rand__(self, arg: int, /) -> int: ... def __rfloordiv__(self, other) -> Any: ... def __rlshift__(self, other) -> Any: ... def __rmul__(self, other) -> Any: ... + def __ror__(self, arg: int, /) -> int: ... def __rrshift__(self, other) -> Any: ... def __rshift__(self, other) -> Any: ... def __rsub__(self, other) -> Any: ... + def __rxor__(self, arg: int, /) -> int: ... def __sub__(self, other) -> Any: ... + @overload + def __xor__(self, arg: int, /) -> int: ... + @overload + def __xor__(self, arg: lief.PE.Section.CHARACTERISTICS, /) -> int: ... @property def value(self) -> int: ... characteristics: int @@ -2169,18 +2477,41 @@ class Signature(lief.Object): def from_value(arg: int, /) -> lief.PE.Signature.VERIFICATION_CHECKS: ... def __abs__(self) -> Any: ... def __add__(self, other) -> Any: ... + @overload + def __and__(self, arg: int, /) -> int: ... + @overload + def __and__(self, arg: lief.PE.Signature.VERIFICATION_CHECKS, /) -> int: ... def __floordiv__(self, other) -> Any: ... + def __ge__(self, arg: int, /) -> bool: ... + def __gt__(self, arg: int, /) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __invert__(self) -> int: ... + def __le__(self, arg: int, /) -> bool: ... def __lshift__(self, other) -> Any: ... + def __lt__(self, arg: int, /) -> bool: ... def __mul__(self, other) -> Any: ... def __neg__(self) -> Any: ... + @overload + def __or__(self, arg: int, /) -> int: ... + @overload + def __or__(self, arg: lief.PE.Signature.VERIFICATION_CHECKS, /) -> lief.PE.Signature.VERIFICATION_CHECKS: ... def __radd__(self, other) -> Any: ... + def __rand__(self, arg: int, /) -> int: ... def __rfloordiv__(self, other) -> Any: ... def __rlshift__(self, other) -> Any: ... def __rmul__(self, other) -> Any: ... + def __ror__(self, arg: int, /) -> int: ... def __rrshift__(self, other) -> Any: ... def __rshift__(self, other) -> Any: ... def __rsub__(self, other) -> Any: ... + def __rxor__(self, arg: int, /) -> int: ... def __sub__(self, other) -> Any: ... + @overload + def __xor__(self, arg: int, /) -> int: ... + @overload + def __xor__(self, arg: lief.PE.Signature.VERIFICATION_CHECKS, /) -> int: ... @property def value(self) -> int: ... @@ -2204,18 +2535,41 @@ class Signature(lief.Object): def from_value(arg: int, /) -> lief.PE.Signature.VERIFICATION_FLAGS: ... def __abs__(self) -> Any: ... def __add__(self, other) -> Any: ... + @overload + def __and__(self, arg: int, /) -> int: ... + @overload + def __and__(self, arg: lief.PE.Signature.VERIFICATION_FLAGS, /) -> int: ... def __floordiv__(self, other) -> Any: ... + def __ge__(self, arg: int, /) -> bool: ... + def __gt__(self, arg: int, /) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __invert__(self) -> int: ... + def __le__(self, arg: int, /) -> bool: ... def __lshift__(self, other) -> Any: ... + def __lt__(self, arg: int, /) -> bool: ... def __mul__(self, other) -> Any: ... def __neg__(self) -> Any: ... + @overload + def __or__(self, arg: int, /) -> int: ... + @overload + def __or__(self, arg: lief.PE.Signature.VERIFICATION_FLAGS, /) -> lief.PE.Signature.VERIFICATION_FLAGS: ... def __radd__(self, other) -> Any: ... + def __rand__(self, arg: int, /) -> int: ... def __rfloordiv__(self, other) -> Any: ... def __rlshift__(self, other) -> Any: ... def __rmul__(self, other) -> Any: ... + def __ror__(self, arg: int, /) -> int: ... def __rrshift__(self, other) -> Any: ... def __rshift__(self, other) -> Any: ... def __rsub__(self, other) -> Any: ... + def __rxor__(self, arg: int, /) -> int: ... def __sub__(self, other) -> Any: ... + @overload + def __xor__(self, arg: int, /) -> int: ... + @overload + def __xor__(self, arg: lief.PE.Signature.VERIFICATION_FLAGS, /) -> int: ... @property def value(self) -> int: ... @@ -2372,6 +2726,13 @@ class WINDOW_STYLES: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.WINDOW_STYLES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -2388,6 +2749,13 @@ class x509(lief.Object): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.x509.KEY_TYPES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -2405,6 +2773,13 @@ class x509(lief.Object): def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PE.x509.KEY_USAGE: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -2436,18 +2811,41 @@ class x509(lief.Object): def from_value(arg: int, /) -> lief.PE.x509.VERIFICATION_FLAGS: ... def __abs__(self) -> Any: ... def __add__(self, other) -> Any: ... + @overload + def __and__(self, arg: int, /) -> int: ... + @overload + def __and__(self, arg: lief.PE.x509.VERIFICATION_FLAGS, /) -> int: ... def __floordiv__(self, other) -> Any: ... + def __ge__(self, arg: int, /) -> bool: ... + def __gt__(self, arg: int, /) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __invert__(self) -> int: ... + def __le__(self, arg: int, /) -> bool: ... def __lshift__(self, other) -> Any: ... + def __lt__(self, arg: int, /) -> bool: ... def __mul__(self, other) -> Any: ... def __neg__(self) -> Any: ... + @overload + def __or__(self, arg: int, /) -> int: ... + @overload + def __or__(self, arg: lief.PE.x509.VERIFICATION_FLAGS, /) -> lief.PE.x509.VERIFICATION_FLAGS: ... def __radd__(self, other) -> Any: ... + def __rand__(self, arg: int, /) -> int: ... def __rfloordiv__(self, other) -> Any: ... def __rlshift__(self, other) -> Any: ... def __rmul__(self, other) -> Any: ... + def __ror__(self, arg: int, /) -> int: ... def __rrshift__(self, other) -> Any: ... def __rshift__(self, other) -> Any: ... def __rsub__(self, other) -> Any: ... + def __rxor__(self, arg: int, /) -> int: ... def __sub__(self, other) -> Any: ... + @overload + def __xor__(self, arg: int, /) -> int: ... + @overload + def __xor__(self, arg: lief.PE.x509.VERIFICATION_FLAGS, /) -> int: ... @property def value(self) -> int: ... def __init__(self, *args, **kwargs) -> None: ... diff --git a/api/python/lief/__init__.pyi b/api/python/lief/__init__.pyi index d89e5dc3..4c5651ce 100644 --- a/api/python/lief/__init__.pyi +++ b/api/python/lief/__init__.pyi @@ -8,6 +8,7 @@ import lief.ELF # type: ignore import lief.Function # type: ignore import lief.MachO # type: ignore import lief.PE # type: ignore +import lief.logging # type: ignore import os class ARCHITECTURES: @@ -27,6 +28,13 @@ class ARCHITECTURES: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ARCHITECTURES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -39,6 +47,13 @@ class Binary(Object): UNKNOWN: ClassVar[Binary.FORMATS] = ... __name__: Any def __init__(self, *args, **kwargs) -> None: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... class VA_TYPES: AUTO: ClassVar[Binary.VA_TYPES] = ... @@ -46,6 +61,13 @@ class Binary(Object): VA: ClassVar[Binary.VA_TYPES] = ... __name__: Any def __init__(self, *args, **kwargs) -> None: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... class it_relocations: def __init__(self, *args, **kwargs) -> None: ... @@ -118,6 +140,13 @@ class ENDIANNESS: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.ENDIANNESS: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -130,6 +159,13 @@ class Function(Symbol): IMPORTED: ClassVar[Function.FLAGS] = ... __name__: Any def __init__(self, *args, **kwargs) -> None: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... address: int @overload def __init__(self) -> None: ... @@ -176,6 +212,13 @@ class MODES: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.MODES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -188,11 +231,19 @@ class OBJECT_TYPES: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.OBJECT_TYPES: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... class Object: def __init__(self, *args, **kwargs) -> None: ... + def __hash__(self) -> int: ... class PLATFORMS: ANDROID: ClassVar[PLATFORMS] = ... @@ -205,6 +256,13 @@ class PLATFORMS: def __init__(self, *args, **kwargs) -> None: ... @staticmethod def from_value(arg: int, /) -> lief.PLATFORMS: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... @property def value(self) -> int: ... @@ -257,6 +315,13 @@ class lief_errors: read_out_of_bound: ClassVar[lief_errors] = ... __name__: Any def __init__(self, *args, **kwargs) -> None: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... class ok_error_t: def __init__(self, *args, **kwargs) -> None: ... diff --git a/api/python/lief/logging.pyi b/api/python/lief/logging.pyi index 3df1f4a5..eef04cb9 100644 --- a/api/python/lief/logging.pyi +++ b/api/python/lief/logging.pyi @@ -11,6 +11,13 @@ class LOGGING_LEVEL: WARNING: ClassVar[LOGGING_LEVEL] = ... __name__: Any def __init__(self, *args, **kwargs) -> None: ... + def __ge__(self, other) -> bool: ... + def __gt__(self, other) -> bool: ... + def __hash__(self) -> int: ... + def __index__(self) -> Any: ... + def __int__(self) -> int: ... + def __le__(self, other) -> bool: ... + def __lt__(self, other) -> bool: ... def disable() -> None: ... def enable() -> None: ... diff --git a/api/python/src/PE/objects/signature/pyContentInfo.cpp b/api/python/src/PE/objects/signature/pyContentInfo.cpp index b4e39aac..10beaa70 100644 --- a/api/python/src/PE/objects/signature/pyContentInfo.cpp +++ b/api/python/src/PE/objects/signature/pyContentInfo.cpp @@ -22,6 +22,8 @@ #include #include +#include "nanobind/utils.hpp" + namespace LIEF::PE::py { template<> @@ -82,6 +84,17 @@ void create(nb::module_& m) { .def_prop_ro("content_type", &ContentInfo::content_type, "An alias for :attr:`~.ContentInfo.content_type`"_doc) + .def_prop_ro("digest", + [] (const ContentInfo& self) -> nb::bytes { + return nb::to_bytes(self.digest()); + }, + R"delim( + Return the digest (authentihash) if the underlying content type is + `SPC_INDIRECT_DATA_OBJID`. Return an empty vector otherwise. + )delim"_doc + ) + .def_prop_ro("digest_algorithm", &ContentInfo::digest_algorithm, + "Return the hash algorithm used to generate the :attr:`.digest`"_doc) .def_prop_ro("value", nb::overload_cast<>(&ContentInfo::value), nb::rv_policy::reference_internal) diff --git a/include/LIEF/PE/signature/ContentInfo.hpp b/include/LIEF/PE/signature/ContentInfo.hpp index 8bb44979..5ec35ebe 100644 --- a/include/LIEF/PE/signature/ContentInfo.hpp +++ b/include/LIEF/PE/signature/ContentInfo.hpp @@ -124,6 +124,14 @@ class LIEF_API ContentInfo : public Object { return *value_; } + /// Return the digest (authentihash) if the underlying content type is `SPC_INDIRECT_DATA_OBJID` + /// Otherwise, return an empty vector + std::vector digest() const; + + /// Return the OID algorithm if the underlying content type is `SPC_INDIRECT_DATA_OBJID` + /// Otherwise, return an empty oid + ALGORITHMS digest_algorithm() const; + void accept(Visitor& visitor) const override; ~ContentInfo() override; diff --git a/src/PE/signature/ContentInfo.cpp b/src/PE/signature/ContentInfo.cpp index 968e7910..c1c6e300 100644 --- a/src/PE/signature/ContentInfo.cpp +++ b/src/PE/signature/ContentInfo.cpp @@ -16,8 +16,12 @@ #include "LIEF/Visitor.hpp" #include "LIEF/PE/signature/ContentInfo.hpp" #include "LIEF/PE/EnumToString.hpp" +#include "LIEF/PE/signature/SpcIndirectData.hpp" #include "LIEF/utils.hpp" +#include "Object.tcc" +#include "internal_utils.hpp" + #include namespace LIEF { @@ -48,6 +52,22 @@ void ContentInfo::accept(Visitor& visitor) const { visitor.visit(*this); } +std::vector ContentInfo::digest() const { + if (SpcIndirectData::classof(value_.get())) { + const auto* spc_ind_data = value_->as(); + return as_vector(spc_ind_data->digest()); + } + return {}; +} + +ALGORITHMS ContentInfo::digest_algorithm() const { + if (SpcIndirectData::classof(value_.get())) { + const auto* spc_ind_data = value_->as(); + return spc_ind_data->digest_algorithm(); + } + return ALGORITHMS::UNKNOWN; +} + std::ostream& operator<<(std::ostream& os, const ContentInfo& content_info) { content_info.value().print(os); return os; diff --git a/tests/pe/test_authenticode.py b/tests/pe/test_authenticode.py index b57fee6e..8626d00d 100644 --- a/tests/pe/test_authenticode.py +++ b/tests/pe/test_authenticode.py @@ -44,6 +44,8 @@ def test_api(): spc_indirect_data = content_info.value assert content_info.content_type == "1.3.6.1.4.1.311.2.1.4" + assert content_info.digest == bytes(spc_indirect_data.digest) + assert content_info.digest_algorithm == spc_indirect_data.digest_algorithm assert spc_indirect_data.digest_algorithm == lief.PE.ALGORITHMS.SHA_256 assert spc_indirect_data.digest == from_hex("a7:38:da:44:46:a4:e7:8a:b6:47:db:7e:53:42:7e:b0:79:61:c9:94:31:7f:4c:59:d7:ed:be:a5:cc:78:6d:80")