mit neuen venv und exe-Files

This commit is contained in:
2024-11-03 17:26:54 +01:00
parent 07c05a338a
commit 0c373ff593
15115 changed files with 1998469 additions and 0 deletions

View File

@@ -0,0 +1,81 @@
from typing import Any, ClassVar, Optional, Union
from typing import overload
import io
import lief.ART # type: ignore
import lief.Android # type: ignore
import os
class File(lief.Object):
def __init__(self, *args, **kwargs) -> None: ...
@property
def header(self) -> lief.ART.Header: ...
class Header(lief.Object):
def __init__(self, *args, **kwargs) -> None: ...
@property
def boot_image_begin(self) -> int: ...
@property
def boot_image_size(self) -> int: ...
@property
def boot_oat_begin(self) -> int: ...
@property
def boot_oat_size(self) -> int: ...
@property
def compile_pic(self) -> bool: ...
@property
def data_size(self) -> int: ...
@property
def image_begin(self) -> int: ...
@property
def image_roots(self) -> int: ...
@property
def image_size(self) -> int: ...
@property
def magic(self) -> list[int]: ...
@property
def nb_methods(self) -> int: ...
@property
def nb_sections(self) -> int: ...
@property
def oat_checksum(self) -> int: ...
@property
def oat_data_end(self) -> int: ...
@property
def oat_file_begin(self) -> int: ...
@property
def oat_file_end(self) -> int: ...
@property
def patch_delta(self) -> int: ...
@property
def pointer_size(self) -> int: ...
@property
def storage_mode(self) -> lief.ART.STORAGE_MODES: ...
@property
def version(self) -> int: ...
class STORAGE_MODES:
LZ4: ClassVar[STORAGE_MODES] = ...
LZ4HC: ClassVar[STORAGE_MODES] = ...
UNCOMPRESSED: ClassVar[STORAGE_MODES] = ...
__name__: str
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
def parse(filename: str) -> Optional[lief.ART.File]: ...
@overload
def parse(raw: list[int], name: str = ...) -> Optional[lief.ART.File]: ...
@overload
def parse(obj: Union[io.IOBase|os.PathLike], name: str = ...) -> Optional[lief.ART.File]: ...
@overload
def version(file: str) -> int: ...
@overload
def version(raw: list[int]) -> int: ...

View File

@@ -0,0 +1,29 @@
from typing import Any, ClassVar
import lief.Android # type: ignore
class ANDROID_VERSIONS:
UNKNOWN: ClassVar[ANDROID_VERSIONS] = ...
VERSION_601: ClassVar[ANDROID_VERSIONS] = ...
VERSION_700: ClassVar[ANDROID_VERSIONS] = ...
VERSION_710: ClassVar[ANDROID_VERSIONS] = ...
VERSION_712: ClassVar[ANDROID_VERSIONS] = ...
VERSION_800: ClassVar[ANDROID_VERSIONS] = ...
VERSION_810: ClassVar[ANDROID_VERSIONS] = ...
VERSION_900: ClassVar[ANDROID_VERSIONS] = ...
__name__: str
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: ...
def code_name(version: lief.Android.ANDROID_VERSIONS) -> str: ...
def version_string(version: lief.Android.ANDROID_VERSIONS) -> str: ...

View File

@@ -0,0 +1,382 @@
from typing import Any, ClassVar, Optional, Union
from typing import overload
import io
import lief.DEX # type: ignore
import lief.DEX.Class # type: ignore
import lief.DEX.File # type: ignore
import lief.DEX.MapItem # type: ignore
import lief.DEX.MapList # type: ignore
import lief.DEX.Prototype # type: ignore
import lief.DEX.Type # type: ignore
import os
class ACCESS_FLAGS:
ABSTRACT: ClassVar[ACCESS_FLAGS] = ...
ANNOTATION: ClassVar[ACCESS_FLAGS] = ...
BRIDGE: ClassVar[ACCESS_FLAGS] = ...
CONSTRUCTOR: ClassVar[ACCESS_FLAGS] = ...
DECLARED_SYNCHRONIZED: ClassVar[ACCESS_FLAGS] = ...
ENUM: ClassVar[ACCESS_FLAGS] = ...
FINAL: ClassVar[ACCESS_FLAGS] = ...
INTERFACE: ClassVar[ACCESS_FLAGS] = ...
NATIVE: ClassVar[ACCESS_FLAGS] = ...
PRIVATE: ClassVar[ACCESS_FLAGS] = ...
PROTECTED: ClassVar[ACCESS_FLAGS] = ...
PUBLIC: ClassVar[ACCESS_FLAGS] = ...
STATIC: ClassVar[ACCESS_FLAGS] = ...
STRICT: ClassVar[ACCESS_FLAGS] = ...
SYNCHRONIZED: ClassVar[ACCESS_FLAGS] = ...
SYNTHETIC: ClassVar[ACCESS_FLAGS] = ...
TRANSIENT: ClassVar[ACCESS_FLAGS] = ...
UNKNOWN: ClassVar[ACCESS_FLAGS] = ...
VARARGS: ClassVar[ACCESS_FLAGS] = ...
VOLATILE: ClassVar[ACCESS_FLAGS] = ...
__name__: str
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:
def __init__(self, *args, **kwargs) -> None: ...
def __getitem__(self, arg: int, /) -> lief.DEX.Field: ...
def __iter__(self) -> lief.DEX.Class.it_fields: ...
def __len__(self) -> int: ...
def __next__(self) -> lief.DEX.Field: ...
class it_methods:
def __init__(self, *args, **kwargs) -> None: ...
def __getitem__(self, arg: int, /) -> lief.DEX.Method: ...
def __iter__(self) -> lief.DEX.Class.it_methods: ...
def __len__(self) -> int: ...
def __next__(self) -> lief.DEX.Method: ...
class it_named_fields:
def __init__(self, *args, **kwargs) -> None: ...
def __getitem__(self, arg: int, /) -> lief.DEX.Field: ...
def __iter__(self) -> lief.DEX.Class.it_named_fields: ...
def __len__(self) -> int: ...
def __next__(self) -> lief.DEX.Field: ...
class it_named_methods:
def __init__(self, *args, **kwargs) -> None: ...
def __getitem__(self, arg: int, /) -> lief.DEX.Method: ...
def __iter__(self) -> lief.DEX.Class.it_named_methods: ...
def __len__(self) -> int: ...
def __next__(self) -> lief.DEX.Method: ...
def __init__(self, *args, **kwargs) -> None: ...
def get_field(self, name: str) -> lief.DEX.Class.it_named_fields: ...
def get_method(self, name: str) -> lief.DEX.Class.it_named_methods: ...
def has(self, flag: lief.DEX.ACCESS_FLAGS) -> bool: ...
@property
def access_flags(self) -> list[lief.DEX.ACCESS_FLAGS]: ...
@property
def dex2dex_info(self) -> dict[lief.DEX.Method,dict[int,int]]: ...
@property
def fields(self) -> lief.DEX.Class.it_fields: ...
@property
def fullname(self) -> str: ...
@property
def has_parent(self) -> bool: ...
@property
def index(self) -> int: ...
@property
def methods(self) -> lief.DEX.Class.it_methods: ...
@property
def name(self) -> str: ...
@property
def package_name(self) -> str: ...
@property
def parent(self) -> lief.DEX.Class: ...
@property
def pretty_name(self) -> str: ...
@property
def source_filename(self) -> str: ...
class CodeInfo(lief.Object):
def __init__(self, *args, **kwargs) -> None: ...
class Field(lief.Object):
def __init__(self, *args, **kwargs) -> None: ...
def has(self, flag: lief.DEX.ACCESS_FLAGS) -> bool: ...
@property
def access_flags(self) -> list[lief.DEX.ACCESS_FLAGS]: ...
@property
def cls(self) -> lief.DEX.Class: ...
@property
def has_class(self) -> bool: ...
@property
def index(self) -> int: ...
@property
def is_static(self) -> bool: ...
@property
def name(self) -> str: ...
@property
def type(self) -> lief.DEX.Type: ...
class File(lief.Object):
class it_classes:
def __init__(self, *args, **kwargs) -> None: ...
def __getitem__(self, arg: int, /) -> lief.DEX.Class: ...
def __iter__(self) -> lief.DEX.File.it_classes: ...
def __len__(self) -> int: ...
def __next__(self) -> lief.DEX.Class: ...
class it_fields:
def __init__(self, *args, **kwargs) -> None: ...
def __getitem__(self, arg: int, /) -> lief.DEX.Field: ...
def __iter__(self) -> lief.DEX.File.it_fields: ...
def __len__(self) -> int: ...
def __next__(self) -> lief.DEX.Field: ...
class it_methods:
def __init__(self, *args, **kwargs) -> None: ...
def __getitem__(self, arg: int, /) -> lief.DEX.Method: ...
def __iter__(self) -> lief.DEX.File.it_methods: ...
def __len__(self) -> int: ...
def __next__(self) -> lief.DEX.Method: ...
class it_prototypes:
def __init__(self, *args, **kwargs) -> None: ...
def __getitem__(self, arg: int, /) -> lief.DEX.Prototype: ...
def __iter__(self) -> lief.DEX.File.it_prototypes: ...
def __len__(self) -> int: ...
def __next__(self) -> lief.DEX.Prototype: ...
class it_strings:
def __init__(self, *args, **kwargs) -> None: ...
def __getitem__(self, arg: int, /) -> str: ...
def __iter__(self) -> lief.DEX.File.it_strings: ...
def __len__(self) -> int: ...
def __next__(self) -> str: ...
class it_types:
def __init__(self, *args, **kwargs) -> None: ...
def __getitem__(self, arg: int, /) -> lief.DEX.Type: ...
def __iter__(self) -> lief.DEX.File.it_types: ...
def __len__(self) -> int: ...
def __next__(self) -> lief.DEX.Type: ...
location: str
name: str
def __init__(self, *args, **kwargs) -> None: ...
@overload
def get_class(self, classname: str) -> lief.DEX.Class: ...
@overload
def get_class(self, classname: int) -> lief.DEX.Class: ...
def has_class(self, classname: str) -> bool: ...
def raw(self, deoptimize: bool = ...) -> list[int]: ...
def save(self, output: str = ..., deoptimize: bool = ...) -> str: ...
@property
def classes(self) -> lief.DEX.File.it_classes: ...
@property
def dex2dex_json_info(self) -> str: ...
@property
def fields(self) -> lief.DEX.File.it_fields: ...
@property
def header(self) -> lief.DEX.Header: ...
@property
def map(self) -> lief.DEX.MapList: ...
@property
def methods(self) -> lief.DEX.File.it_methods: ...
@property
def prototypes(self) -> lief.DEX.File.it_prototypes: ...
@property
def strings(self) -> lief.DEX.File.it_strings: ...
@property
def types(self) -> lief.DEX.File.it_types: ...
@property
def version(self) -> int: ...
class Header(lief.Object):
def __init__(self, *args, **kwargs) -> None: ...
@property
def checksum(self) -> int: ...
@property
def classes(self) -> tuple[int,int]: ...
@property
def data(self) -> tuple[int,int]: ...
@property
def endian_tag(self) -> int: ...
@property
def fields(self) -> tuple[int,int]: ...
@property
def file_size(self) -> int: ...
@property
def header_size(self) -> int: ...
@property
def link(self) -> tuple[int,int]: ...
@property
def magic(self) -> list[int]: ...
@property
def map_offset(self) -> int: ...
@property
def methods(self) -> tuple[int,int]: ...
@property
def nb_classes(self) -> int: ...
@property
def nb_methods(self) -> int: ...
@property
def prototypes(self) -> tuple[int,int]: ...
@property
def signature(self) -> list[int]: ...
@property
def strings(self) -> tuple[int,int]: ...
@property
def types(self) -> tuple[int,int]: ...
class MapItem(lief.Object):
class TYPES:
ANNOTATION: ClassVar[MapItem.TYPES] = ...
ANNOTATIONS_DIRECTORY: ClassVar[MapItem.TYPES] = ...
ANNOTATION_SET: ClassVar[MapItem.TYPES] = ...
ANNOTATION_SET_REF_LIST: ClassVar[MapItem.TYPES] = ...
CALL_SITE_ID: ClassVar[MapItem.TYPES] = ...
CLASS_DATA: ClassVar[MapItem.TYPES] = ...
CLASS_DEF: ClassVar[MapItem.TYPES] = ...
CODE: ClassVar[MapItem.TYPES] = ...
DEBUG_INFO: ClassVar[MapItem.TYPES] = ...
ENCODED_ARRAY: ClassVar[MapItem.TYPES] = ...
FIELD_ID: ClassVar[MapItem.TYPES] = ...
HEADER: ClassVar[MapItem.TYPES] = ...
MAP_LIST: ClassVar[MapItem.TYPES] = ...
METHOD_HANDLE: ClassVar[MapItem.TYPES] = ...
METHOD_ID: ClassVar[MapItem.TYPES] = ...
PROTO_ID: ClassVar[MapItem.TYPES] = ...
STRING_DATA: ClassVar[MapItem.TYPES] = ...
STRING_ID: ClassVar[MapItem.TYPES] = ...
TYPE_ID: ClassVar[MapItem.TYPES] = ...
TYPE_LIST: ClassVar[MapItem.TYPES] = ...
__name__: str
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: ...
@property
def offset(self) -> int: ...
@property
def size(self) -> int: ...
@property
def type(self) -> lief.DEX.MapItem.TYPES: ...
class MapList(lief.Object):
class it_items_t:
def __init__(self, *args, **kwargs) -> None: ...
def __getitem__(self, arg: int, /) -> lief.DEX.MapItem: ...
def __iter__(self) -> lief.DEX.MapList.it_items_t: ...
def __len__(self) -> int: ...
def __next__(self) -> lief.DEX.MapItem: ...
def __init__(self, *args, **kwargs) -> None: ...
def get(self, type: lief.DEX.MapItem.TYPES) -> lief.DEX.MapItem: ...
def has(self, type: lief.DEX.MapItem.TYPES) -> bool: ...
def __getitem__(self, arg: lief.DEX.MapItem.TYPES, /) -> lief.DEX.MapItem: ...
@property
def items(self) -> lief.DEX.MapList.it_items_t: ...
class Method(lief.Object):
def __init__(self, *args, **kwargs) -> None: ...
def has(self, flag: lief.DEX.ACCESS_FLAGS) -> bool: ...
def insert_dex2dex_info(self, pc: int, index: int) -> None: ...
@property
def access_flags(self) -> list[lief.DEX.ACCESS_FLAGS]: ...
@property
def bytecode(self) -> list[int]: ...
@property
def cls(self) -> lief.DEX.Class: ...
@property
def code_offset(self) -> int: ...
@property
def has_class(self) -> bool: ...
@property
def index(self) -> int: ...
@property
def is_virtual(self) -> bool: ...
@property
def name(self) -> str: ...
@property
def prototype(self) -> lief.DEX.Prototype: ...
class Prototype(lief.Object):
class it_params:
def __init__(self, *args, **kwargs) -> None: ...
def __getitem__(self, arg: int, /) -> lief.DEX.Type: ...
def __iter__(self) -> lief.DEX.Prototype.it_params: ...
def __len__(self) -> int: ...
def __next__(self) -> lief.DEX.Type: ...
def __init__(self, *args, **kwargs) -> None: ...
@property
def parameters_type(self) -> lief.DEX.Prototype.it_params: ...
@property
def return_type(self) -> lief.DEX.Type: ...
class Type(lief.Object):
class PRIMITIVES:
BOOLEAN: ClassVar[Type.PRIMITIVES] = ...
BYTE: ClassVar[Type.PRIMITIVES] = ...
CHAR: ClassVar[Type.PRIMITIVES] = ...
DOUBLE: ClassVar[Type.PRIMITIVES] = ...
FLOAT: ClassVar[Type.PRIMITIVES] = ...
INT: ClassVar[Type.PRIMITIVES] = ...
LONG: ClassVar[Type.PRIMITIVES] = ...
SHORT: ClassVar[Type.PRIMITIVES] = ...
VOID_T: ClassVar[Type.PRIMITIVES] = ...
__name__: str
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] = ...
CLASS: ClassVar[Type.TYPES] = ...
PRIMITIVE: ClassVar[Type.TYPES] = ...
UNKNOWN: ClassVar[Type.TYPES] = ...
__name__: str
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: ...
@property
def dim(self) -> int: ...
@property
def type(self) -> lief.DEX.Type.TYPES: ...
@property
def underlying_array_type(self) -> lief.DEX.Type: ...
@property
def value(self) -> object: ...
@overload
def parse(filename: str) -> Optional[lief.DEX.File]: ...
@overload
def parse(raw: list[int], name: str = ...) -> Optional[lief.DEX.File]: ...
@overload
def parse(obj: Union[io.IOBase|os.PathLike], name: str = ...) -> Optional[lief.DEX.File]: ...
@overload
def version(file: str) -> int: ...
@overload
def version(raw: list[int]) -> int: ...

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,271 @@
from typing import Any, ClassVar, Optional, Union
from typing import overload
import io
import lief.Android # type: ignore
import lief.DEX # type: ignore
import lief.ELF # type: ignore
import lief.OAT # type: ignore
import lief.OAT.Binary # type: ignore
import lief.OAT.Class # type: ignore
import lief.OAT.Header # type: ignore
import os
class Binary(lief.ELF.Binary):
class it_classes:
def __init__(self, *args, **kwargs) -> None: ...
def __getitem__(self, arg: int, /) -> lief.OAT.Class: ...
def __iter__(self) -> lief.OAT.Binary.it_classes: ...
def __len__(self) -> int: ...
def __next__(self) -> lief.OAT.Class: ...
class it_dex_files:
def __init__(self, *args, **kwargs) -> None: ...
def __getitem__(self, arg: int, /) -> lief.DEX.File: ...
def __iter__(self) -> lief.OAT.Binary.it_dex_files: ...
def __len__(self) -> int: ...
def __next__(self) -> lief.DEX.File: ...
class it_methods:
def __init__(self, *args, **kwargs) -> None: ...
def __getitem__(self, arg: int, /) -> lief.OAT.Method: ...
def __iter__(self) -> lief.OAT.Binary.it_methods: ...
def __len__(self) -> int: ...
def __next__(self) -> lief.OAT.Method: ...
class it_oat_dex_files:
def __init__(self, *args, **kwargs) -> None: ...
def __getitem__(self, arg: int, /) -> lief.OAT.DexFile: ...
def __iter__(self) -> lief.OAT.Binary.it_oat_dex_files: ...
def __len__(self) -> int: ...
def __next__(self) -> lief.OAT.DexFile: ...
def __init__(self, *args, **kwargs) -> None: ...
@overload
def get_class(self, class_name: str) -> lief.OAT.Class: ...
@overload
def get_class(self, class_index: int) -> lief.OAT.Class: ...
@property
def classes(self) -> lief.OAT.Binary.it_classes: ...
@property
def dex2dex_json_info(self) -> str: ...
@property
def dex_files(self) -> lief.OAT.Binary.it_dex_files: ...
@property
def has_class(self) -> bool: ...
@property
def header(self) -> lief.OAT.Header: ... # type: ignore
@property
def methods(self) -> lief.OAT.Binary.it_methods: ...
@property
def oat_dex_files(self) -> lief.OAT.Binary.it_oat_dex_files: ...
class Class(lief.Object):
class it_methods:
def __init__(self, *args, **kwargs) -> None: ...
def __getitem__(self, arg: int, /) -> lief.OAT.Method: ...
def __iter__(self) -> lief.OAT.Class.it_methods: ...
def __len__(self) -> int: ...
def __next__(self) -> lief.OAT.Method: ...
def __init__(self) -> None: ...
def has_dex_class(self) -> bool: ...
@overload
def is_quickened(self, dex_method: lief.DEX.Method) -> bool: ...
@overload
def is_quickened(self, method_index: int) -> bool: ...
@overload
def method_offsets_index(self, arg: lief.DEX.Method, /) -> int: ...
@overload
def method_offsets_index(self, arg: int, /) -> int: ...
@property
def bitmap(self) -> list[int]: ...
@property
def fullname(self) -> str: ...
@property
def index(self) -> int: ...
@property
def methods(self) -> lief.OAT.Class.it_methods: ...
@property
def status(self) -> lief.OAT.OAT_CLASS_STATUS: ...
@property
def type(self) -> lief.OAT.OAT_CLASS_TYPES: ...
class DexFile(lief.Object):
checksum: int
dex_offset: int
location: str
def __init__(self) -> None: ...
@property
def dex_file(self) -> lief.DEX.File: ...
@property
def has_dex_file(self) -> bool: ...
class HEADER_KEYS:
BOOT_CLASS_PATH: ClassVar[HEADER_KEYS] = ...
CLASS_PATH: ClassVar[HEADER_KEYS] = ...
COMPILER_FILTER: ClassVar[HEADER_KEYS] = ...
CONCURRENT_COPYING: ClassVar[HEADER_KEYS] = ...
DEBUGGABLE: ClassVar[HEADER_KEYS] = ...
DEX2OAT_CMD_LINE: ClassVar[HEADER_KEYS] = ...
DEX2OAT_HOST: ClassVar[HEADER_KEYS] = ...
HAS_PATCH_INFO: ClassVar[HEADER_KEYS] = ...
IMAGE_LOCATION: ClassVar[HEADER_KEYS] = ...
NATIVE_DEBUGGABLE: ClassVar[HEADER_KEYS] = ...
PIC: ClassVar[HEADER_KEYS] = ...
__name__: str
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:
key: lief.OAT.HEADER_KEYS
value: str
def __init__(self, *args, **kwargs) -> None: ...
class it_key_values_t:
def __init__(self, *args, **kwargs) -> None: ...
def __getitem__(self, arg: int, /) -> lief.OAT.Header.element_t: ...
def __iter__(self) -> lief.OAT.Header.it_key_values_t: ...
def __len__(self) -> int: ...
def __next__(self) -> lief.OAT.Header.element_t: ...
def __init__(self) -> None: ...
def get(self, key: lief.OAT.HEADER_KEYS) -> str: ...
def set(self, key: lief.OAT.HEADER_KEYS, value: str) -> lief.OAT.Header: ...
def __getitem__(self, arg: lief.OAT.HEADER_KEYS, /) -> str: ...
def __setitem__(self, arg0: lief.OAT.HEADER_KEYS, arg1: str, /) -> lief.OAT.Header: ...
@property
def checksum(self) -> int: ...
@property
def executable_offset(self) -> int: ...
@property
def i2c_code_bridge_offset(self) -> int: ...
@property
def i2i_bridge_offset(self) -> int: ...
@property
def image_file_location_oat_checksum(self) -> int: ...
@property
def image_file_location_oat_data_begin(self) -> int: ...
@property
def image_patch_delta(self) -> int: ...
@property
def instruction_set(self) -> lief.OAT.INSTRUCTION_SETS: ...
@property
def jni_dlsym_lookup_offset(self) -> int: ...
@property
def key_value_size(self) -> int: ...
@property
def key_values(self) -> lief.OAT.Header.it_key_values_t: ...
@property
def keys(self) -> list[lief.OAT.HEADER_KEYS]: ...
@property
def magic(self) -> list[int]: ...
@property
def nb_dex_files(self) -> int: ...
@property
def oat_dex_files_offset(self) -> int: ...
@property
def quick_generic_jni_trampoline_offset(self) -> int: ...
@property
def quick_imt_conflict_trampoline_offset(self) -> int: ...
@property
def quick_resolution_trampoline_offset(self) -> int: ...
@property
def quick_to_interpreter_bridge_offset(self) -> int: ...
@property
def values(self) -> list[str]: ...
@property
def version(self) -> int: ...
class INSTRUCTION_SETS:
ARM: ClassVar[INSTRUCTION_SETS] = ...
ARM_64: ClassVar[INSTRUCTION_SETS] = ...
MIPS: ClassVar[INSTRUCTION_SETS] = ...
MIPS_64: ClassVar[INSTRUCTION_SETS] = ...
NONE: ClassVar[INSTRUCTION_SETS] = ...
THUMB2: ClassVar[INSTRUCTION_SETS] = ...
X86: ClassVar[INSTRUCTION_SETS] = ...
X86_64: ClassVar[INSTRUCTION_SETS] = ...
__name__: str
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]
def __init__(self) -> None: ...
@property
def dex_method(self) -> lief.DEX.Method: ...
@property
def has_dex_method(self) -> bool: ...
@property
def is_compiled(self) -> bool: ...
@property
def is_dex2dex_optimized(self) -> bool: ...
@property
def name(self) -> str: ...
@property
def oat_class(self) -> lief.OAT.Class: ...
class OAT_CLASS_STATUS:
ERROR: ClassVar[OAT_CLASS_STATUS] = ...
IDX: ClassVar[OAT_CLASS_STATUS] = ...
INITIALIZED: ClassVar[OAT_CLASS_STATUS] = ...
INITIALIZING: ClassVar[OAT_CLASS_STATUS] = ...
LOADED: ClassVar[OAT_CLASS_STATUS] = ...
NOTREADY: ClassVar[OAT_CLASS_STATUS] = ...
RESOLVED: ClassVar[OAT_CLASS_STATUS] = ...
RESOLVING: ClassVar[OAT_CLASS_STATUS] = ...
RETIRED: ClassVar[OAT_CLASS_STATUS] = ...
VERIFICATION_AT_RUNTIME: ClassVar[OAT_CLASS_STATUS] = ...
VERIFIED: ClassVar[OAT_CLASS_STATUS] = ...
VERIFYING: ClassVar[OAT_CLASS_STATUS] = ...
VERIFYING_AT_RUNTIME: ClassVar[OAT_CLASS_STATUS] = ...
__name__: str
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] = ...
NONE_COMPILED: ClassVar[OAT_CLASS_TYPES] = ...
SOME_COMPILED: ClassVar[OAT_CLASS_TYPES] = ...
__name__: str
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
def parse(oat_file: str) -> Optional[lief.OAT.Binary]: ...
@overload
def parse(oat_file: str, vdex_file: str) -> Optional[lief.OAT.Binary]: ...
@overload
def parse(raw: list[int]) -> Optional[lief.OAT.Binary]: ...
@overload
def parse(obj: Union[io.IOBase|os.PathLike]) -> Optional[lief.OAT.Binary]: ...
@overload
def version(binary: lief.ELF.Binary) -> int: ...
@overload
def version(file: str) -> int: ...
@overload
def version(raw: list[int]) -> int: ...

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,49 @@
from typing import Optional, Union
from typing import overload
import io
import lief.Android # type: ignore
import lief.DEX # type: ignore
import lief.OAT.Binary # type: ignore
import lief.VDEX # type: ignore
import os
class File(lief.Object):
class it_dex_files:
def __init__(self, *args, **kwargs) -> None: ...
def __getitem__(self, arg: int, /) -> lief.DEX.File: ...
def __iter__(self) -> lief.OAT.Binary.it_dex_files: ...
def __len__(self) -> int: ...
def __next__(self) -> lief.DEX.File: ...
def __init__(self, *args, **kwargs) -> None: ...
@property
def dex2dex_json_info(self) -> str: ...
@property
def dex_files(self) -> lief.OAT.Binary.it_dex_files: ...
@property
def header(self) -> lief.VDEX.Header: ...
class Header(lief.Object):
def __init__(self, *args, **kwargs) -> None: ...
@property
def dex_size(self) -> int: ...
@property
def magic(self) -> list[int]: ...
@property
def nb_dex_files(self) -> int: ...
@property
def quickening_info_size(self) -> int: ...
@property
def verifier_deps_size(self) -> int: ...
@property
def version(self) -> int: ...
def android_version(vdex_version: int) -> lief.Android.ANDROID_VERSIONS: ...
@overload
def parse(filename: str) -> Optional[lief.VDEX.File]: ...
@overload
def parse(obj: Union[io.IOBase|os.PathLike], name: str = ...) -> Optional[lief.VDEX.File]: ...
@overload
def version(file: str) -> int: ...
@overload
def version(raw: list[int]) -> int: ...

View File

@@ -0,0 +1,13 @@
import os
import sys
import traceback
if len(__path__) > 0 and __path__[0] not in sys.path:
from . import _lief
from ._lief import *
from ._lief import __version__, __tag__, __commit__, __is_tagged__, __extended__
# cf. https://github.com/pytorch/pytorch/blob/60a3b7425dde97fe8b46183c154a9c3b24f0c733/torch/__init__.py#L467-L470
for attr in dir(_lief):
candidate = getattr(_lief, attr)
if type(candidate) is type(_lief):
sys.modules.setdefault(f"lief.{attr}", candidate)

View File

@@ -0,0 +1,428 @@
from typing import Any, ClassVar, Optional, Union
from . import ART, Android, DEX, ELF, MachO, OAT, PE, VDEX, dwarf, logging, objc, pdb # type: ignore
from typing import overload
import io
import lief # type: ignore
import lief.Binary # type: ignore
import lief.DebugInfo # type: ignore
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:
ARM: ClassVar[ARCHITECTURES] = ...
ARM64: ClassVar[ARCHITECTURES] = ...
INTEL: ClassVar[ARCHITECTURES] = ...
LOONGARCH: ClassVar[ARCHITECTURES] = ...
MIPS: ClassVar[ARCHITECTURES] = ...
NONE: ClassVar[ARCHITECTURES] = ...
PPC: ClassVar[ARCHITECTURES] = ...
RISCV: ClassVar[ARCHITECTURES] = ...
SPARC: ClassVar[ARCHITECTURES] = ...
SYSZ: ClassVar[ARCHITECTURES] = ...
X86: ClassVar[ARCHITECTURES] = ...
XCORE: ClassVar[ARCHITECTURES] = ...
__name__: str
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: ...
class Binary(Object):
class FORMATS:
ELF: ClassVar[Binary.FORMATS] = ...
MACHO: ClassVar[Binary.FORMATS] = ...
OAT: ClassVar[Binary.FORMATS] = ...
PE: ClassVar[Binary.FORMATS] = ...
UNKNOWN: ClassVar[Binary.FORMATS] = ...
__name__: str
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] = ...
RVA: ClassVar[Binary.VA_TYPES] = ...
VA: ClassVar[Binary.VA_TYPES] = ...
__name__: str
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: ...
def __getitem__(self, arg: int, /) -> lief.Relocation: ...
def __iter__(self) -> lief.Binary.it_relocations: ...
def __len__(self) -> int: ...
def __next__(self) -> lief.Relocation: ...
class it_sections:
def __init__(self, *args, **kwargs) -> None: ...
def __getitem__(self, arg: int, /) -> lief.Section: ...
def __iter__(self) -> lief.Binary.it_sections: ...
def __len__(self) -> int: ...
def __next__(self) -> lief.Section: ...
class it_symbols:
def __init__(self, *args, **kwargs) -> None: ...
def __getitem__(self, arg: int, /) -> lief.Symbol: ...
def __iter__(self) -> lief.Binary.it_symbols: ...
def __len__(self) -> int: ...
def __next__(self) -> lief.Symbol: ...
def __init__(self, *args, **kwargs) -> None: ...
def get_content_from_virtual_address(self, virtual_address: int, size: int, va_type: lief.Binary.VA_TYPES = ...) -> memoryview: ...
def get_function_address(self, function_name: str) -> Union[int,lief.lief_errors]: ...
def get_symbol(self, symbol_name: str) -> lief.Symbol: ...
def has_symbol(self, symbol_name: str) -> bool: ...
def offset_to_virtual_address(self, offset: int, slide: int = ...) -> Union[int,lief.lief_errors]: ...
@overload
def patch_address(self, address: int, patch_value: list[int], va_type: lief.Binary.VA_TYPES = ...) -> None: ...
@overload
def patch_address(self, address: int, patch_value: int, size: int = ..., va_type: lief.Binary.VA_TYPES = ...) -> None: ...
def remove_section(self, name: str, clear: bool = ...) -> None: ...
def xref(self, virtual_address: int) -> list[int]: ...
@property
def abstract(self) -> lief.Binary: ...
@property
def concrete(self) -> lief.ELF.Binary | lief.PE.Binary | lief.MachO.Binary: ...
@property
def ctor_functions(self) -> list[lief.Function]: ...
@property
def debug_info(self) -> lief.DebugInfo: ...
@property
def entrypoint(self) -> int: ...
@property
def exported_functions(self) -> list[lief.Function]: ...
@property
def format(self) -> lief.Binary.FORMATS: ...
@property
def has_nx(self) -> bool: ...
@property
def header(self) -> lief.Header: ...
@property
def imagebase(self) -> int: ...
@property
def imported_functions(self) -> list[lief.Function]: ...
@property
def is_pie(self) -> bool: ...
@property
def libraries(self) -> list[Union[str,bytes]]: ...
@property
def original_size(self) -> int: ...
@property
def relocations(self) -> lief.Binary.it_relocations: ...
@property
def sections(self) -> lief.Binary.it_sections: ...
@property
def symbols(self) -> lief.Binary.it_symbols: ...
class DebugInfo:
class FORMAT:
DWARF: ClassVar[DebugInfo.FORMAT] = ...
PDB: ClassVar[DebugInfo.FORMAT] = ...
UNKNOWN: ClassVar[DebugInfo.FORMAT] = ...
__name__: str
def __init__(self, *args, **kwargs) -> None: ...
@staticmethod
def from_value(arg: int, /) -> lief.DebugInfo.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: ...
def __init__(self, *args, **kwargs) -> None: ...
@property
def format(self) -> lief.DebugInfo.FORMAT: ...
class ENDIANNESS:
BIG: ClassVar[ENDIANNESS] = ...
LITTLE: ClassVar[ENDIANNESS] = ...
NONE: ClassVar[ENDIANNESS] = ...
__name__: str
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: ...
class Function(Symbol):
class FLAGS:
CONSTRUCTOR: ClassVar[Function.FLAGS] = ...
DEBUG_INFO: ClassVar[Function.FLAGS] = ...
DESTRUCTOR: ClassVar[Function.FLAGS] = ...
EXPORTED: ClassVar[Function.FLAGS] = ...
IMPORTED: ClassVar[Function.FLAGS] = ...
__name__: str
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: ...
@overload
def __init__(self, arg: str, /) -> None: ...
@overload
def __init__(self, arg: int, /) -> None: ...
@overload
def __init__(self, arg0: str, arg1: int, /) -> None: ...
def add(self, flag: lief.Function.FLAGS) -> lief.Function: ...
@property
def flags(self) -> list[lief.Function.FLAGS]: ...
class Header(Object):
architecture: lief.ARCHITECTURES
endianness: lief.ENDIANNESS
entrypoint: int
modes: set[lief.MODES]
object_type: lief.OBJECT_TYPES
def __init__(self) -> None: ...
@property
def is_32(self) -> bool: ...
@property
def is_64(self) -> bool: ...
class MODES:
ARM: ClassVar[MODES] = ...
M16: ClassVar[MODES] = ...
M32: ClassVar[MODES] = ...
M64: ClassVar[MODES] = ...
MCLASS: ClassVar[MODES] = ...
MIPS3: ClassVar[MODES] = ...
MIPS32: ClassVar[MODES] = ...
MIPS32R6: ClassVar[MODES] = ...
MIPS64: ClassVar[MODES] = ...
MIPSGP64: ClassVar[MODES] = ...
NONE: ClassVar[MODES] = ...
THUMB: ClassVar[MODES] = ...
UNDEFINED: ClassVar[MODES] = ...
V7: ClassVar[MODES] = ...
V8: ClassVar[MODES] = ...
V9: ClassVar[MODES] = ...
__name__: str
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: ...
class OBJECT_TYPES:
EXECUTABLE: ClassVar[OBJECT_TYPES] = ...
LIBRARY: ClassVar[OBJECT_TYPES] = ...
NONE: ClassVar[OBJECT_TYPES] = ...
OBJECT: ClassVar[OBJECT_TYPES] = ...
__name__: str
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] = ...
IOS: ClassVar[PLATFORMS] = ...
LINUX: ClassVar[PLATFORMS] = ...
OSX: ClassVar[PLATFORMS] = ...
UNKNOWN: ClassVar[PLATFORMS] = ...
WINDOWS: ClassVar[PLATFORMS] = ...
__name__: str
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: ...
class Relocation(Object):
address: int
size: int
def __init__(self, *args, **kwargs) -> None: ...
class Section(Object):
content: memoryview
name: Union[str,bytes]
offset: int
size: int
virtual_address: int
def __init__(self, *args, **kwargs) -> None: ...
@overload
def search(self, number: int, pos: int = ..., size: int = ...) -> Optional[int]: ...
@overload
def search(self, str: str, pos: int = ...) -> Optional[int]: ...
@overload
def search(self, bytes: bytes, pos: int = ...) -> Optional[int]: ...
@overload
def search_all(self, number: int, size: int = ...) -> list[int]: ...
@overload
def search_all(self, str: str) -> list[int]: ...
@property
def entropy(self) -> float: ...
@property
def fullname(self) -> bytes: ...
class Symbol(Object):
name: Union[str,bytes]
size: int
value: int
def __init__(self, *args, **kwargs) -> None: ...
class debug_location_t:
file: str
line: int
def __init__(self, *args, **kwargs) -> None: ...
class lief_errors:
asn1_bad_tag: ClassVar[lief_errors] = ...
build_error: ClassVar[lief_errors] = ...
conversion_error: ClassVar[lief_errors] = ...
corrupted: ClassVar[lief_errors] = ...
data_too_large: ClassVar[lief_errors] = ...
file_error: ClassVar[lief_errors] = ...
file_format_error: ClassVar[lief_errors] = ...
not_found: ClassVar[lief_errors] = ...
not_implemented: ClassVar[lief_errors] = ...
not_supported: ClassVar[lief_errors] = ...
parsing_error: ClassVar[lief_errors] = ...
read_error: ClassVar[lief_errors] = ...
read_out_of_bound: ClassVar[lief_errors] = ...
__name__: str
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: ...
def __bool__(self) -> bool: ...
@property
def error(self) -> lief_errors: ...
@property
def is_error(self) -> bool: ...
@property
def is_value(self) -> bool: ...
@property
def value(self) -> lief.ok_t: ...
class ok_t:
def __init__(self, *args, **kwargs) -> None: ...
def __bool__(self) -> bool: ...
class range_t:
high: int
low: int
def __init__(self, *args, **kwargs) -> None: ...
@property
def size(self) -> int: ...
def current_platform() -> lief.PLATFORMS: ...
def disable_leak_warning() -> None: ...
@overload
def hash(arg: lief.Object, /) -> int: ...
@overload
def hash(arg: list[int], /) -> int: ...
@overload
def hash(arg: bytes, /) -> int: ...
@overload
def hash(arg: str, /) -> int: ...
@overload
def is_art(path: str) -> bool: ...
@overload
def is_art(raw: list[int]) -> bool: ...
@overload
def is_dex(path: str) -> bool: ...
@overload
def is_dex(raw: list[int]) -> bool: ...
@overload
def is_elf(filename: str) -> bool: ...
@overload
def is_elf(raw: list[int]) -> bool: ...
@overload
def is_macho(filename: str) -> bool: ...
@overload
def is_macho(raw: list[int]) -> bool: ...
@overload
def is_oat(binary: lief.ELF.Binary) -> bool: ...
@overload
def is_oat(path: str) -> bool: ...
@overload
def is_oat(raw: list[int]) -> bool: ...
@overload
def is_pe(file: str) -> bool: ...
@overload
def is_pe(raw: list[int]) -> bool: ...
@overload
def is_vdex(path: str) -> bool: ...
@overload
def is_vdex(raw: list[int]) -> bool: ...
@overload
def parse(raw: bytes) -> Optional[lief.Binary]: ...
@overload
def parse(filepath: str) -> Optional[lief.Binary]: ...
@overload
def parse(obj: Union[io.IOBase|os.PathLike]) -> Optional[lief.Binary]: ...
def to_json(arg: lief.Object, /) -> str: ...

Binary file not shown.

View File

@@ -0,0 +1,193 @@
from typing import Any, ClassVar, Iterator, Optional
from typing import overload
import lief # type: ignore
import lief.dwarf # type: ignore
import lief.dwarf.CompilationUnit # type: ignore
import lief.dwarf.CompilationUnit.Language # type: ignore
import lief.dwarf.Function # type: ignore
import lief.dwarf.Scope # type: ignore
import lief.dwarf.Type # type: ignore
class CompilationUnit:
class Language:
class LANG:
C: ClassVar[CompilationUnit.Language.LANG] = ...
CPP: ClassVar[CompilationUnit.Language.LANG] = ...
DART: ClassVar[CompilationUnit.Language.LANG] = ...
RUST: ClassVar[CompilationUnit.Language.LANG] = ...
UNKNOWN: ClassVar[CompilationUnit.Language.LANG] = ...
__name__: str
def __init__(self, *args, **kwargs) -> None: ...
@staticmethod
def from_value(arg: int, /) -> lief.dwarf.CompilationUnit.Language.LANG: ...
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: ...
lang: lief.dwarf.CompilationUnit.Language.LANG
version: int
def __init__(self, *args, **kwargs) -> None: ...
def __init__(self, *args, **kwargs) -> None: ...
@overload
def find_function(self, name: str) -> Optional[lief.dwarf.Function]: ...
@overload
def find_function(self, addr: int) -> Optional[lief.dwarf.Function]: ...
@overload
def find_variable(self, addr: int) -> Optional[lief.dwarf.Variable]: ...
@overload
def find_variable(self, name: str) -> Optional[lief.dwarf.Variable]: ...
@property
def compilation_dir(self) -> str: ...
@property
def functions(self) -> Iterator[Optional[lief.dwarf.Function]]: ...
@property
def high_address(self) -> int: ...
@property
def language(self) -> lief.dwarf.CompilationUnit.Language: ...
@property
def low_address(self) -> int: ...
@property
def name(self) -> str: ...
@property
def producer(self) -> str: ...
@property
def ranges(self) -> list[lief.range_t]: ...
@property
def size(self) -> int: ...
@property
def types(self) -> Iterator[Optional[lief.dwarf.Type]]: ...
@property
def variables(self) -> Iterator[Optional[lief.dwarf.Variable]]: ...
class DebugInfo(lief.DebugInfo):
def __init__(self, *args, **kwargs) -> None: ...
@overload
def find_function(self, name: str) -> Optional[lief.dwarf.Function]: ...
@overload
def find_function(self, addr: int) -> Optional[lief.dwarf.Function]: ...
def find_type(self, name: str) -> Optional[lief.dwarf.Type]: ...
@overload
def find_variable(self, addr: int) -> Optional[lief.dwarf.Variable]: ...
@overload
def find_variable(self, name: str) -> Optional[lief.dwarf.Variable]: ...
@property
def compilation_units(self) -> Iterator[Optional[lief.dwarf.CompilationUnit]]: ...
class Function:
class Parameter:
def __init__(self, *args, **kwargs) -> None: ...
@property
def name(self) -> str: ...
@property
def type(self) -> Optional[lief.dwarf.Type]: ...
def __init__(self, *args, **kwargs) -> None: ...
@property
def address(self) -> Optional[int]: ...
@property
def debug_location(self) -> lief.debug_location_t: ...
@property
def is_artificial(self) -> bool: ...
@property
def linkage_name(self) -> str: ...
@property
def name(self) -> str: ...
@property
def parameters(self) -> list[lief.dwarf.Function.Parameter]: ...
@property
def ranges(self) -> list[lief.range_t]: ...
@property
def scope(self) -> Optional[lief.dwarf.Scope]: ...
@property
def size(self) -> int: ...
@property
def type(self) -> Optional[lief.dwarf.Type]: ...
@property
def variables(self) -> Iterator[Optional[lief.dwarf.Variable]]: ...
class Scope:
class TYPE:
CLASS: ClassVar[Scope.TYPE] = ...
COMPILATION_UNIT: ClassVar[Scope.TYPE] = ...
FUNCTION: ClassVar[Scope.TYPE] = ...
NAMESPACE: ClassVar[Scope.TYPE] = ...
STRUCT: ClassVar[Scope.TYPE] = ...
UNION: ClassVar[Scope.TYPE] = ...
UNKNOWN: ClassVar[Scope.TYPE] = ...
__name__: str
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: ...
def chained(self, sep: str = ...) -> str: ...
@property
def name(self) -> str: ...
@property
def parent(self) -> Optional[lief.dwarf.Scope]: ...
@property
def type(self) -> lief.dwarf.Scope.TYPE: ...
class Type:
class KIND:
ARRAY: ClassVar[Type.KIND] = ...
BASE: ClassVar[Type.KIND] = ...
CLASS: ClassVar[Type.KIND] = ...
CONST: ClassVar[Type.KIND] = ...
POINTER: ClassVar[Type.KIND] = ...
STRUCT: ClassVar[Type.KIND] = ...
UNION: ClassVar[Type.KIND] = ...
UNKNOWN: ClassVar[Type.KIND] = ...
UNSPECIFIED: ClassVar[Type.KIND] = ...
__name__: str
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: ...
@property
def is_unspecified(self) -> bool: ...
@property
def kind(self) -> lief.dwarf.Type.KIND: ...
@property
def location(self) -> lief.debug_location_t: ...
@property
def name(self) -> Optional[str]: ...
@property
def scope(self) -> Optional[lief.dwarf.Scope]: ...
@property
def size(self) -> Optional[int]: ...
class Variable:
def __init__(self, *args, **kwargs) -> None: ...
@property
def address(self) -> Optional[int]: ...
@property
def debug_location(self) -> lief.debug_location_t: ...
@property
def is_constexpr(self) -> bool: ...
@property
def linkage_name(self) -> str: ...
@property
def name(self) -> str: ...
@property
def scope(self) -> Optional[lief.dwarf.Scope]: ...
@property
def size(self) -> Optional[int]: ...
@property
def type(self) -> Optional[lief.dwarf.Type]: ...
def load(path: str) -> Optional[lief.dwarf.DebugInfo]: ...

View File

@@ -0,0 +1,72 @@
from typing import Any, ClassVar, Optional
import lief.dwarf # type: ignore
import lief.dwarf.types.Base # type: ignore
import lief.dwarf.types.ClassLike # type: ignore
class Array(lief.dwarf.Type):
def __init__(self, *args, **kwargs) -> None: ...
@property
def underlying_type(self) -> lief.dwarf.Type: ...
class Base(lief.dwarf.Type):
class ENCODING:
ADDRESS: ClassVar[Base.ENCODING] = ...
BOOLEAN: ClassVar[Base.ENCODING] = ...
FLOAT: ClassVar[Base.ENCODING] = ...
NONE: ClassVar[Base.ENCODING] = ...
SIGNED: ClassVar[Base.ENCODING] = ...
SIGNED_CHAR: ClassVar[Base.ENCODING] = ...
UNSIGNED: ClassVar[Base.ENCODING] = ...
UNSIGNED_CHAR: ClassVar[Base.ENCODING] = ...
__name__: str
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: ...
@property
def encoding(self) -> lief.dwarf.types.Base.ENCODING: ...
class Class(ClassLike):
def __init__(self, *args, **kwargs) -> None: ...
class ClassLike(lief.dwarf.Type):
class Member:
def __init__(self, *args, **kwargs) -> None: ...
@property
def bit_offset(self) -> Optional[int]: ...
@property
def is_declaration(self) -> bool: ...
@property
def is_external(self) -> bool: ...
@property
def name(self) -> str: ...
@property
def offset(self) -> Optional[int]: ...
@property
def type(self) -> Optional[lief.dwarf.Type]: ...
def __init__(self, *args, **kwargs) -> None: ...
def find_member(self, offset: int) -> Optional[lief.dwarf.types.ClassLike.Member]: ...
@property
def members(self) -> list[lief.dwarf.types.ClassLike.Member]: ...
class Const(lief.dwarf.Type):
def __init__(self, *args, **kwargs) -> None: ...
@property
def underlying_type(self) -> lief.dwarf.Type: ...
class Pointer(lief.dwarf.Type):
def __init__(self, *args, **kwargs) -> None: ...
@property
def underlying_type(self) -> lief.dwarf.Type: ...
class Structure(ClassLike):
def __init__(self, *args, **kwargs) -> None: ...
class Union(ClassLike):
def __init__(self, *args, **kwargs) -> None: ...

View File

@@ -0,0 +1,27 @@
from typing import Any, ClassVar
import lief.logging # type: ignore
class LEVEL:
CRITICAL: ClassVar[LEVEL] = ...
DEBUG: ClassVar[LEVEL] = ...
ERROR: ClassVar[LEVEL] = ...
INFO: ClassVar[LEVEL] = ...
TRACE: ClassVar[LEVEL] = ...
WARN: ClassVar[LEVEL] = ...
__name__: str
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: ...
def log(level: lief.logging.LEVEL, msg: str) -> None: ...
def reset() -> None: ...
def set_level(level: lief.logging.LEVEL) -> None: ...
def set_path(path: str) -> None: ...

View File

@@ -0,0 +1,68 @@
from typing import Iterator, Optional
import lief.objc # type: ignore
class Class:
def __init__(self, *args, **kwargs) -> None: ...
@property
def demangled_name(self) -> str: ...
@property
def is_meta(self) -> bool: ...
@property
def ivars(self) -> Iterator[Optional[lief.objc.IVar]]: ...
@property
def methods(self) -> Iterator[Optional[lief.objc.Method]]: ...
@property
def name(self) -> str: ...
@property
def properties(self) -> Iterator[Optional[lief.objc.Property]]: ...
@property
def protocols(self) -> Iterator[Optional[lief.objc.Protocol]]: ...
@property
def super_class(self) -> Optional[lief.objc.Class]: ...
class IVar:
def __init__(self, *args, **kwargs) -> None: ...
@property
def mangled_type(self) -> str: ...
@property
def name(self) -> str: ...
class Metadata:
def __init__(self, *args, **kwargs) -> None: ...
def get_class(self, name: str) -> Optional[lief.objc.Class]: ...
def get_protocol(self, name: str) -> Optional[lief.objc.Protocol]: ...
def to_decl(self) -> str: ...
@property
def classes(self) -> Iterator[Optional[lief.objc.Class]]: ...
@property
def protocols(self) -> Iterator[Optional[lief.objc.Protocol]]: ...
class Method:
def __init__(self, *args, **kwargs) -> None: ...
@property
def address(self) -> int: ...
@property
def is_instance(self) -> bool: ...
@property
def mangled_type(self) -> str: ...
@property
def name(self) -> str: ...
class Property:
def __init__(self, *args, **kwargs) -> None: ...
@property
def attribute(self) -> str: ...
@property
def name(self) -> str: ...
class Protocol:
def __init__(self, *args, **kwargs) -> None: ...
@property
def mangled_name(self) -> str: ...
@property
def optional_methods(self) -> Iterator[Optional[lief.objc.Method]]: ...
@property
def properties(self) -> Iterator[Optional[lief.objc.Property]]: ...
@property
def required_methods(self) -> Iterator[Optional[lief.objc.Method]]: ...

View File

@@ -0,0 +1,86 @@
from typing import Any, ClassVar, Iterator, Optional
import lief # type: ignore
import lief.pdb # type: ignore
import lief.pdb.Type # type: ignore
class CompilationUnit:
def __init__(self, *args, **kwargs) -> None: ...
@property
def functions(self) -> Iterator[Optional[lief.pdb.Function]]: ...
@property
def module_name(self) -> str: ...
@property
def object_filename(self) -> str: ...
@property
def sources(self) -> Iterator[str]: ...
class DebugInfo(lief.DebugInfo):
def __init__(self, *args, **kwargs) -> None: ...
def find_public_symbol(self, name: str) -> Optional[lief.pdb.PublicSymbol]: ...
def find_type(self, name: str) -> Optional[lief.pdb.Type]: ...
@staticmethod
def from_file(filepath: str) -> Optional[lief.pdb.DebugInfo]: ...
@property
def age(self) -> int: ...
@property
def compilation_units(self) -> Iterator[Optional[lief.pdb.CompilationUnit]]: ...
@property
def guid(self) -> str: ...
@property
def public_symbols(self) -> Iterator[Optional[lief.pdb.PublicSymbol]]: ...
@property
def types(self) -> Iterator[Optional[lief.pdb.Type]]: ...
class Function:
def __init__(self, *args, **kwargs) -> None: ...
@property
def RVA(self) -> int: ...
@property
def code_size(self) -> int: ...
@property
def debug_location(self) -> lief.debug_location_t: ...
@property
def name(self) -> str: ...
@property
def section_name(self) -> str: ...
class PublicSymbol:
def __init__(self, *args, **kwargs) -> None: ...
@property
def RVA(self) -> int: ...
@property
def demangled_name(self) -> str: ...
@property
def name(self) -> str: ...
@property
def section_name(self) -> str: ...
class Type:
class KIND:
ARRAY: ClassVar[Type.KIND] = ...
BITFIELD: ClassVar[Type.KIND] = ...
CLASS: ClassVar[Type.KIND] = ...
ENUM: ClassVar[Type.KIND] = ...
FUNCTION: ClassVar[Type.KIND] = ...
INTERFACE: ClassVar[Type.KIND] = ...
MODIFIER: ClassVar[Type.KIND] = ...
POINTER: ClassVar[Type.KIND] = ...
SIMPLE: ClassVar[Type.KIND] = ...
STRUCTURE: ClassVar[Type.KIND] = ...
UNION: ClassVar[Type.KIND] = ...
UNKNOWN: ClassVar[Type.KIND] = ...
__name__: str
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: ...
@property
def kind(self) -> lief.pdb.Type.KIND: ...
def load(path: str) -> Optional[lief.pdb.DebugInfo]: ...

View File

@@ -0,0 +1,68 @@
from typing import Iterator, Optional
import lief.pdb # type: ignore
import lief.pdb.types # type: ignore
class Array(lief.pdb.Type):
def __init__(self, *args, **kwargs) -> None: ...
class Attribute:
def __init__(self, *args, **kwargs) -> None: ...
@property
def field_offset(self) -> int: ...
@property
def name(self) -> str: ...
@property
def type(self) -> Optional[lief.pdb.Type]: ...
class BitField(lief.pdb.Type):
def __init__(self, *args, **kwargs) -> None: ...
class Class(ClassLike):
def __init__(self, *args, **kwargs) -> None: ...
class ClassLike(lief.pdb.Type):
def __init__(self, *args, **kwargs) -> None: ...
@property
def attributes(self) -> Iterator[Optional[lief.pdb.types.Attribute]]: ...
@property
def methods(self) -> Iterator[Optional[lief.pdb.types.Method]]: ...
@property
def name(self) -> str: ...
@property
def size(self) -> int: ...
@property
def unique_name(self) -> str: ...
class Enum(lief.pdb.Type):
def __init__(self, *args, **kwargs) -> None: ...
class Function(lief.pdb.Type):
def __init__(self, *args, **kwargs) -> None: ...
class Interface(ClassLike):
def __init__(self, *args, **kwargs) -> None: ...
class Method:
def __init__(self, *args, **kwargs) -> None: ...
@property
def name(self) -> str: ...
class Modifier(lief.pdb.Type):
def __init__(self, *args, **kwargs) -> None: ...
@property
def underlying_type(self) -> Optional[lief.pdb.Type]: ...
class Pointer(lief.pdb.Type):
def __init__(self, *args, **kwargs) -> None: ...
@property
def underlying_type(self) -> Optional[lief.pdb.Type]: ...
class Simple(lief.pdb.Type):
def __init__(self, *args, **kwargs) -> None: ...
class Structure(ClassLike):
def __init__(self, *args, **kwargs) -> None: ...
class Union(ClassLike):
def __init__(self, *args, **kwargs) -> None: ...

View File