lief 0.17.3__cp38-cp38-musllinux_1_2_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,58 @@
1
+ from typing import Iterator, Optional, Union
2
+
3
+ import lief.PE
4
+
5
+
6
+ class UnpackedFunction(lief.PE.RuntimeFunctionAArch64):
7
+ class epilog_scope_t:
8
+ start_offset: int
9
+
10
+ start_index: int
11
+
12
+ reserved: int
13
+
14
+ class it_epilog_scopes:
15
+ def __getitem__(self, arg: int, /) -> UnpackedFunction.epilog_scope_t: ...
16
+
17
+ def __len__(self) -> int: ...
18
+
19
+ def __iter__(self) -> UnpackedFunction.it_epilog_scopes: ...
20
+
21
+ def __next__(self) -> UnpackedFunction.epilog_scope_t: ...
22
+
23
+ xdata_rva: int
24
+
25
+ version: int
26
+
27
+ X: int
28
+
29
+ E: int
30
+
31
+ @property
32
+ def epilog_count(self) -> int: ...
33
+
34
+ @property
35
+ def epilog_offset(self) -> int: ...
36
+
37
+ code_words: int
38
+
39
+ exception_handler: int
40
+
41
+ unwind_code: memoryview
42
+
43
+ @property
44
+ def epilog_scopes(self) -> UnpackedFunction.it_epilog_scopes: ...
45
+
46
+ @property
47
+ def is_extended(self) -> bool: ...
48
+
49
+ class PackedFunction(lief.PE.RuntimeFunctionAArch64):
50
+ frame_size: int
51
+
52
+ reg_I: int
53
+
54
+ reg_F: int
55
+
56
+ H: int
57
+
58
+ CR: int
@@ -0,0 +1,53 @@
1
+ from typing import Iterator, Optional, Union
2
+
3
+ import lief.PE
4
+
5
+
6
+ class Code:
7
+ @property
8
+ def opcode(self) -> lief.PE.RuntimeFunctionX64.UNWIND_OPCODES: ...
9
+
10
+ @property
11
+ def position(self) -> int: ...
12
+
13
+ def __str__(self) -> str: ...
14
+
15
+ class Alloc(Code):
16
+ @property
17
+ def size(self) -> int: ...
18
+
19
+ class PushNonVol(Code):
20
+ @property
21
+ def reg(self) -> lief.PE.RuntimeFunctionX64.UNWIND_REG: ...
22
+
23
+ class PushMachFrame(Code):
24
+ @property
25
+ def value(self) -> int: ...
26
+
27
+ class SetFPReg(Code):
28
+ @property
29
+ def reg(self) -> lief.PE.RuntimeFunctionX64.UNWIND_REG: ...
30
+
31
+ class SaveNonVolatile(Code):
32
+ @property
33
+ def reg(self) -> lief.PE.RuntimeFunctionX64.UNWIND_REG: ...
34
+
35
+ @property
36
+ def offset(self) -> int: ...
37
+
38
+ class SaveXMM128(Code):
39
+ @property
40
+ def num(self) -> int: ...
41
+
42
+ @property
43
+ def offset(self) -> int: ...
44
+
45
+ class Epilog(Code):
46
+ @property
47
+ def flags(self) -> int: ...
48
+
49
+ @property
50
+ def size(self) -> int: ...
51
+
52
+ class Spare(Code):
53
+ pass
lief/VDEX/__init__.pyi ADDED
@@ -0,0 +1,56 @@
1
+ from collections.abc import Sequence
2
+ import io
3
+ import os
4
+ from typing import Iterator, Optional, Union, overload
5
+
6
+ import lief
7
+ import lief.Android
8
+ import lief.OAT
9
+
10
+
11
+ @overload
12
+ def parse(filename: str) -> Optional[File]: ...
13
+
14
+ @overload
15
+ def parse(obj: Union[str | io.IOBase | os.PathLike | bytes | list[int]], name: str = '') -> Optional[File]: ...
16
+
17
+ class File(lief.Object):
18
+ @property
19
+ def header(self) -> Header: ...
20
+
21
+ @property
22
+ def dex_files(self) -> lief.OAT.Binary.it_dex_files: ...
23
+
24
+ @property
25
+ def dex2dex_json_info(self) -> str: ...
26
+
27
+ def __str__(self) -> str: ...
28
+
29
+ class Header(lief.Object):
30
+ @property
31
+ def magic(self) -> list[int]: ...
32
+
33
+ @property
34
+ def version(self) -> int: ...
35
+
36
+ @property
37
+ def nb_dex_files(self) -> int: ...
38
+
39
+ @property
40
+ def dex_size(self) -> int: ...
41
+
42
+ @property
43
+ def verifier_deps_size(self) -> int: ...
44
+
45
+ @property
46
+ def quickening_info_size(self) -> int: ...
47
+
48
+ def __str__(self) -> str: ...
49
+
50
+ @overload
51
+ def version(file: str) -> int: ...
52
+
53
+ @overload
54
+ def version(raw: Sequence[int]) -> int: ...
55
+
56
+ def android_version(vdex_version: int) -> lief.Android.ANDROID_VERSIONS: ...
lief/__init__.py ADDED
@@ -0,0 +1,16 @@
1
+ import os
2
+ import sys
3
+ import traceback
4
+ if len(__path__) > 0 and __path__[0] not in sys.path:
5
+ from . import _lief
6
+ from ._lief import *
7
+ from ._lief import __version__, __tag__, __commit__, __is_tagged__, __extended__
8
+
9
+ if __extended__:
10
+ from ._lief_extended import __LIEF_MAIN_COMMIT__, __LIEF_EXTENDED_VERSION_STR__, __extended_version__
11
+
12
+ # cf. https://github.com/pytorch/pytorch/blob/60a3b7425dde97fe8b46183c154a9c3b24f0c733/torch/__init__.py#L467-L470
13
+ for attr in dir(_lief):
14
+ candidate = getattr(_lief, attr)
15
+ if type(candidate) is type(_lief):
16
+ sys.modules.setdefault(f"lief.{attr}", candidate)