lief 0.15.1__cp311-cp311-win_amd64.whl → 0.16.1__cp311-cp311-win_amd64.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.
Potentially problematic release.
This version of lief might be problematic. Click here for more details.
- lief/{ART.pyi → ART/__init__.pyi} +65 -45
- lief/Android/__init__.pyi +33 -0
- lief/DEX/__init__.pyi +512 -0
- lief/ELF/__init__.pyi +5342 -0
- lief/MachO/__init__.pyi +2678 -0
- lief/OAT/__init__.pyi +348 -0
- lief/PE/__init__.pyi +4098 -0
- lief/VDEX/__init__.pyi +54 -0
- lief/__init__.py +3 -0
- lief/__init__.pyi +457 -316
- lief/_lief.pyd +0 -0
- lief/assembly/__init__.pyi +104 -0
- lief/assembly/aarch64/__init__.pyi +20200 -0
- lief/assembly/aarch64/operands/__init__.pyi +48 -0
- lief/assembly/arm/__init__.pyi +9004 -0
- lief/assembly/ebpf/__init__.pyi +984 -0
- lief/assembly/mips/__init__.pyi +5798 -0
- lief/assembly/powerpc/__init__.pyi +5714 -0
- lief/assembly/riscv/__init__.pyi +27674 -0
- lief/assembly/x86/__init__.pyi +40433 -0
- lief/assembly/x86/operands/__init__.pyi +32 -0
- lief/dsc/__init__.pyi +220 -0
- lief/dwarf/__init__.pyi +224 -125
- lief/dwarf/parameters/__init__.pyi +14 -0
- lief/dwarf/types/__init__.pyi +167 -0
- lief/logging/__init__.pyi +44 -0
- lief/objc/__init__.pyi +89 -0
- lief/pdb/__init__.pyi +66 -50
- lief/pdb/types/__init__.pyi +69 -0
- lief-0.16.1.dist-info/METADATA +86 -0
- lief-0.16.1.dist-info/RECORD +33 -0
- lief/Android.pyi +0 -29
- lief/DEX.pyi +0 -382
- lief/ELF.pyi +0 -3179
- lief/MachO.pyi +0 -1717
- lief/OAT.pyi +0 -271
- lief/PE.pyi +0 -2951
- lief/VDEX.pyi +0 -49
- lief/dwarf/types.pyi +0 -72
- lief/logging.pyi +0 -27
- lief/objc.pyi +0 -68
- lief/pdb/types.pyi +0 -68
- lief-0.15.1.dist-info/METADATA +0 -157
- lief-0.15.1.dist-info/RECORD +0 -21
- {lief-0.15.1.dist-info → lief-0.16.1.dist-info}/WHEEL +0 -0
lief/__init__.pyi
CHANGED
|
@@ -1,428 +1,569 @@
|
|
|
1
|
-
from
|
|
2
|
-
|
|
3
|
-
from . import ART, Android, DEX, ELF, MachO, OAT, PE, VDEX, dwarf, logging, objc, pdb # type: ignore
|
|
4
|
-
from typing import overload
|
|
1
|
+
from collections.abc import Sequence
|
|
2
|
+
import enum
|
|
5
3
|
import io
|
|
6
|
-
import lief
|
|
7
|
-
import lief.Binary # type: ignore
|
|
8
|
-
import lief.DebugInfo # type: ignore
|
|
9
|
-
import lief.ELF # type: ignore
|
|
10
|
-
import lief.Function # type: ignore
|
|
11
|
-
import lief.MachO # type: ignore
|
|
12
|
-
import lief.PE # type: ignore
|
|
13
|
-
import lief.logging # type: ignore
|
|
4
|
+
import lief
|
|
14
5
|
import os
|
|
6
|
+
from typing import Iterator, Optional, Union, overload
|
|
7
|
+
|
|
8
|
+
from . import (
|
|
9
|
+
ART as ART,
|
|
10
|
+
Android as Android,
|
|
11
|
+
DEX as DEX,
|
|
12
|
+
ELF as ELF,
|
|
13
|
+
MachO as MachO,
|
|
14
|
+
OAT as OAT,
|
|
15
|
+
PE as PE,
|
|
16
|
+
VDEX as VDEX,
|
|
17
|
+
assembly as assembly,
|
|
18
|
+
dsc as dsc,
|
|
19
|
+
dwarf as dwarf,
|
|
20
|
+
logging as logging,
|
|
21
|
+
objc as objc,
|
|
22
|
+
pdb as pdb
|
|
23
|
+
)
|
|
15
24
|
|
|
16
|
-
class ARCHITECTURES:
|
|
17
|
-
ARM: ClassVar[ARCHITECTURES] = ...
|
|
18
|
-
ARM64: ClassVar[ARCHITECTURES] = ...
|
|
19
|
-
INTEL: ClassVar[ARCHITECTURES] = ...
|
|
20
|
-
LOONGARCH: ClassVar[ARCHITECTURES] = ...
|
|
21
|
-
MIPS: ClassVar[ARCHITECTURES] = ...
|
|
22
|
-
NONE: ClassVar[ARCHITECTURES] = ...
|
|
23
|
-
PPC: ClassVar[ARCHITECTURES] = ...
|
|
24
|
-
RISCV: ClassVar[ARCHITECTURES] = ...
|
|
25
|
-
SPARC: ClassVar[ARCHITECTURES] = ...
|
|
26
|
-
SYSZ: ClassVar[ARCHITECTURES] = ...
|
|
27
|
-
X86: ClassVar[ARCHITECTURES] = ...
|
|
28
|
-
XCORE: ClassVar[ARCHITECTURES] = ...
|
|
29
|
-
__name__: str
|
|
30
|
-
def __init__(self, *args, **kwargs) -> None: ...
|
|
31
|
-
@staticmethod
|
|
32
|
-
def from_value(arg: int, /) -> lief.ARCHITECTURES: ...
|
|
33
|
-
def __ge__(self, other) -> bool: ...
|
|
34
|
-
def __gt__(self, other) -> bool: ...
|
|
35
|
-
def __hash__(self) -> int: ...
|
|
36
|
-
def __index__(self) -> Any: ...
|
|
37
|
-
def __int__(self) -> int: ...
|
|
38
|
-
def __le__(self, other) -> bool: ...
|
|
39
|
-
def __lt__(self, other) -> bool: ...
|
|
40
|
-
@property
|
|
41
|
-
def value(self) -> int: ...
|
|
42
25
|
|
|
43
26
|
class Binary(Object):
|
|
44
|
-
class
|
|
45
|
-
|
|
46
|
-
MACHO: ClassVar[Binary.FORMATS] = ...
|
|
47
|
-
OAT: ClassVar[Binary.FORMATS] = ...
|
|
48
|
-
PE: ClassVar[Binary.FORMATS] = ...
|
|
49
|
-
UNKNOWN: ClassVar[Binary.FORMATS] = ...
|
|
50
|
-
__name__: str
|
|
51
|
-
def __init__(self, *args, **kwargs) -> None: ...
|
|
52
|
-
def __ge__(self, other) -> bool: ...
|
|
53
|
-
def __gt__(self, other) -> bool: ...
|
|
54
|
-
def __hash__(self) -> int: ...
|
|
55
|
-
def __index__(self) -> Any: ...
|
|
56
|
-
def __int__(self) -> int: ...
|
|
57
|
-
def __le__(self, other) -> bool: ...
|
|
58
|
-
def __lt__(self, other) -> bool: ...
|
|
59
|
-
|
|
60
|
-
class VA_TYPES:
|
|
61
|
-
AUTO: ClassVar[Binary.VA_TYPES] = ...
|
|
62
|
-
RVA: ClassVar[Binary.VA_TYPES] = ...
|
|
63
|
-
VA: ClassVar[Binary.VA_TYPES] = ...
|
|
64
|
-
__name__: str
|
|
65
|
-
def __init__(self, *args, **kwargs) -> None: ...
|
|
66
|
-
def __ge__(self, other) -> bool: ...
|
|
67
|
-
def __gt__(self, other) -> bool: ...
|
|
68
|
-
def __hash__(self) -> int: ...
|
|
69
|
-
def __index__(self) -> Any: ...
|
|
70
|
-
def __int__(self) -> int: ...
|
|
71
|
-
def __le__(self, other) -> bool: ...
|
|
72
|
-
def __lt__(self, other) -> bool: ...
|
|
27
|
+
class VA_TYPES(enum.Enum):
|
|
28
|
+
AUTO = 0
|
|
73
29
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
30
|
+
VA = 2
|
|
31
|
+
|
|
32
|
+
RVA = 1
|
|
33
|
+
|
|
34
|
+
class FORMATS(enum.Enum):
|
|
35
|
+
UNKNOWN = 0
|
|
36
|
+
|
|
37
|
+
ELF = 1
|
|
38
|
+
|
|
39
|
+
PE = 2
|
|
40
|
+
|
|
41
|
+
MACHO = 3
|
|
42
|
+
|
|
43
|
+
OAT = 4
|
|
80
44
|
|
|
81
45
|
class it_sections:
|
|
82
|
-
def
|
|
83
|
-
|
|
84
|
-
def __iter__(self) -> lief.Binary.it_sections: ...
|
|
46
|
+
def __getitem__(self, arg: int, /) -> Section: ...
|
|
47
|
+
|
|
85
48
|
def __len__(self) -> int: ...
|
|
86
|
-
|
|
49
|
+
|
|
50
|
+
def __iter__(self) -> Binary.it_sections: ...
|
|
51
|
+
|
|
52
|
+
def __next__(self) -> Section: ...
|
|
87
53
|
|
|
88
54
|
class it_symbols:
|
|
89
|
-
def
|
|
90
|
-
|
|
91
|
-
def __iter__(self) -> lief.Binary.it_symbols: ...
|
|
55
|
+
def __getitem__(self, arg: int, /) -> Symbol: ...
|
|
56
|
+
|
|
92
57
|
def __len__(self) -> int: ...
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
58
|
+
|
|
59
|
+
def __iter__(self) -> Binary.it_symbols: ...
|
|
60
|
+
|
|
61
|
+
def __next__(self) -> Symbol: ...
|
|
62
|
+
|
|
63
|
+
class it_relocations:
|
|
64
|
+
def __getitem__(self, arg: int, /) -> Relocation: ...
|
|
65
|
+
|
|
66
|
+
def __len__(self) -> int: ...
|
|
67
|
+
|
|
68
|
+
def __iter__(self) -> Binary.it_relocations: ...
|
|
69
|
+
|
|
70
|
+
def __next__(self) -> Relocation: ...
|
|
71
|
+
|
|
106
72
|
@property
|
|
107
|
-
def
|
|
73
|
+
def debug_info(self) -> DebugInfo: ...
|
|
74
|
+
|
|
108
75
|
@property
|
|
109
|
-
def
|
|
76
|
+
def format(self) -> Binary.FORMATS: ...
|
|
77
|
+
|
|
110
78
|
@property
|
|
111
|
-
def
|
|
79
|
+
def is_pie(self) -> bool: ...
|
|
80
|
+
|
|
81
|
+
@property
|
|
82
|
+
def has_nx(self) -> bool: ...
|
|
83
|
+
|
|
112
84
|
@property
|
|
113
|
-
def
|
|
85
|
+
def header(self) -> Header: ...
|
|
86
|
+
|
|
114
87
|
@property
|
|
115
88
|
def entrypoint(self) -> int: ...
|
|
89
|
+
|
|
90
|
+
def remove_section(self, name: str, clear: bool = False) -> None: ...
|
|
91
|
+
|
|
116
92
|
@property
|
|
117
|
-
def
|
|
118
|
-
|
|
119
|
-
def format(self) -> lief.Binary.FORMATS: ...
|
|
93
|
+
def sections(self) -> Binary.it_sections: ...
|
|
94
|
+
|
|
120
95
|
@property
|
|
121
|
-
def
|
|
96
|
+
def relocations(self) -> Binary.it_relocations: ...
|
|
97
|
+
|
|
122
98
|
@property
|
|
123
|
-
def
|
|
99
|
+
def exported_functions(self) -> list[Function]: ...
|
|
100
|
+
|
|
124
101
|
@property
|
|
125
|
-
def
|
|
102
|
+
def imported_functions(self) -> list[Function]: ...
|
|
103
|
+
|
|
126
104
|
@property
|
|
127
|
-
def
|
|
105
|
+
def libraries(self) -> list[Union[str,bytes]]: ...
|
|
106
|
+
|
|
128
107
|
@property
|
|
129
|
-
def
|
|
108
|
+
def symbols(self) -> Binary.it_symbols: ...
|
|
109
|
+
|
|
110
|
+
def has_symbol(self, symbol_name: str) -> bool: ...
|
|
111
|
+
|
|
112
|
+
def get_symbol(self, symbol_name: str) -> Symbol: ...
|
|
113
|
+
|
|
114
|
+
def get_function_address(self, function_name: str) -> Union[int, lief_errors]: ...
|
|
115
|
+
|
|
116
|
+
@overload
|
|
117
|
+
def patch_address(self, address: int, patch_value: Sequence[int], va_type: Binary.VA_TYPES = Binary.VA_TYPES.AUTO) -> None: ...
|
|
118
|
+
|
|
119
|
+
@overload
|
|
120
|
+
def patch_address(self, address: int, patch_value: int, size: int = 8, va_type: Binary.VA_TYPES = Binary.VA_TYPES.AUTO) -> None: ...
|
|
121
|
+
|
|
122
|
+
def get_content_from_virtual_address(self, virtual_address: int, size: int, va_type: Binary.VA_TYPES = Binary.VA_TYPES.AUTO) -> memoryview: ...
|
|
123
|
+
|
|
124
|
+
def get_int_from_virtual_address(self, address: int, interger_size: int, type: Binary.VA_TYPES = Binary.VA_TYPES.AUTO) -> Optional[int]: ...
|
|
125
|
+
|
|
130
126
|
@property
|
|
131
|
-
def
|
|
127
|
+
def abstract(self) -> lief.Binary: ...
|
|
128
|
+
|
|
132
129
|
@property
|
|
133
|
-
def
|
|
130
|
+
def concrete(self) -> lief.ELF.Binary | lief.PE.Binary | lief.MachO.Binary: ...
|
|
131
|
+
|
|
134
132
|
@property
|
|
135
|
-
def
|
|
133
|
+
def ctor_functions(self) -> list[Function]: ...
|
|
134
|
+
|
|
135
|
+
def xref(self, virtual_address: int) -> list[int]: ...
|
|
136
|
+
|
|
137
|
+
def offset_to_virtual_address(self, offset: int, slide: int = 0) -> Union[int, lief_errors]: ...
|
|
138
|
+
|
|
136
139
|
@property
|
|
137
|
-
def
|
|
140
|
+
def imagebase(self) -> int: ...
|
|
141
|
+
|
|
138
142
|
@property
|
|
139
|
-
def
|
|
143
|
+
def original_size(self) -> int: ...
|
|
144
|
+
|
|
145
|
+
@overload
|
|
146
|
+
def disassemble(self, address: int) -> Iterator[Optional[assembly.Instruction]]: ...
|
|
147
|
+
|
|
148
|
+
@overload
|
|
149
|
+
def disassemble(self, address: int, size: int) -> Iterator[Optional[assembly.Instruction]]: ...
|
|
150
|
+
|
|
151
|
+
@overload
|
|
152
|
+
def disassemble(self, function_name: str) -> Iterator[Optional[assembly.Instruction]]: ...
|
|
153
|
+
|
|
154
|
+
def disassemble_from_bytes(self, buffer: bytes, address: int = 0) -> Iterator[Optional[assembly.Instruction]]: ...
|
|
155
|
+
|
|
156
|
+
def assemble(self, address: int, assembly: str) -> bytes: ...
|
|
157
|
+
|
|
158
|
+
def __str__(self) -> str: ...
|
|
140
159
|
|
|
141
160
|
class DebugInfo:
|
|
142
|
-
class FORMAT:
|
|
143
|
-
DWARF: ClassVar[DebugInfo.FORMAT] = ...
|
|
144
|
-
PDB: ClassVar[DebugInfo.FORMAT] = ...
|
|
145
|
-
UNKNOWN: ClassVar[DebugInfo.FORMAT] = ...
|
|
146
|
-
__name__: str
|
|
147
|
-
def __init__(self, *args, **kwargs) -> None: ...
|
|
161
|
+
class FORMAT(enum.Enum):
|
|
148
162
|
@staticmethod
|
|
149
|
-
def from_value(arg: int, /) ->
|
|
150
|
-
|
|
151
|
-
def
|
|
152
|
-
|
|
153
|
-
def
|
|
163
|
+
def from_value(arg: int, /) -> DebugInfo.FORMAT: ...
|
|
164
|
+
|
|
165
|
+
def __eq__(self, arg, /) -> bool: ...
|
|
166
|
+
|
|
167
|
+
def __ne__(self, arg, /) -> bool: ...
|
|
168
|
+
|
|
154
169
|
def __int__(self) -> int: ...
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
class ENDIANNESS:
|
|
164
|
-
BIG: ClassVar[ENDIANNESS] = ...
|
|
165
|
-
LITTLE: ClassVar[ENDIANNESS] = ...
|
|
166
|
-
NONE: ClassVar[ENDIANNESS] = ...
|
|
167
|
-
__name__: str
|
|
168
|
-
def __init__(self, *args, **kwargs) -> None: ...
|
|
169
|
-
@staticmethod
|
|
170
|
-
def from_value(arg: int, /) -> lief.ENDIANNESS: ...
|
|
171
|
-
def __ge__(self, other) -> bool: ...
|
|
172
|
-
def __gt__(self, other) -> bool: ...
|
|
173
|
-
def __hash__(self) -> int: ...
|
|
174
|
-
def __index__(self) -> Any: ...
|
|
175
|
-
def __int__(self) -> int: ...
|
|
176
|
-
def __le__(self, other) -> bool: ...
|
|
177
|
-
def __lt__(self, other) -> bool: ...
|
|
170
|
+
|
|
171
|
+
UNKNOWN = 0
|
|
172
|
+
|
|
173
|
+
DWARF = 1
|
|
174
|
+
|
|
175
|
+
PDB = 2
|
|
176
|
+
|
|
178
177
|
@property
|
|
179
|
-
def
|
|
178
|
+
def format(self) -> DebugInfo.FORMAT: ...
|
|
180
179
|
|
|
181
180
|
class Function(Symbol):
|
|
182
|
-
class FLAGS:
|
|
183
|
-
CONSTRUCTOR: ClassVar[Function.FLAGS] = ...
|
|
184
|
-
DEBUG_INFO: ClassVar[Function.FLAGS] = ...
|
|
185
|
-
DESTRUCTOR: ClassVar[Function.FLAGS] = ...
|
|
186
|
-
EXPORTED: ClassVar[Function.FLAGS] = ...
|
|
187
|
-
IMPORTED: ClassVar[Function.FLAGS] = ...
|
|
188
|
-
__name__: str
|
|
189
|
-
def __init__(self, *args, **kwargs) -> None: ...
|
|
190
|
-
def __ge__(self, other) -> bool: ...
|
|
191
|
-
def __gt__(self, other) -> bool: ...
|
|
192
|
-
def __hash__(self) -> int: ...
|
|
193
|
-
def __index__(self) -> Any: ...
|
|
194
|
-
def __int__(self) -> int: ...
|
|
195
|
-
def __le__(self, other) -> bool: ...
|
|
196
|
-
def __lt__(self, other) -> bool: ...
|
|
197
|
-
address: int
|
|
198
181
|
@overload
|
|
199
182
|
def __init__(self) -> None: ...
|
|
183
|
+
|
|
200
184
|
@overload
|
|
201
185
|
def __init__(self, arg: str, /) -> None: ...
|
|
186
|
+
|
|
202
187
|
@overload
|
|
203
188
|
def __init__(self, arg: int, /) -> None: ...
|
|
189
|
+
|
|
204
190
|
@overload
|
|
205
191
|
def __init__(self, arg0: str, arg1: int, /) -> None: ...
|
|
206
|
-
|
|
192
|
+
|
|
193
|
+
class FLAGS(enum.Flag):
|
|
194
|
+
@staticmethod
|
|
195
|
+
def from_value(arg: int, /) -> Function.FLAGS: ...
|
|
196
|
+
|
|
197
|
+
def __eq__(self, arg, /) -> bool: ...
|
|
198
|
+
|
|
199
|
+
def __ne__(self, arg, /) -> bool: ...
|
|
200
|
+
|
|
201
|
+
def __int__(self) -> int: ...
|
|
202
|
+
|
|
203
|
+
NONE = 0
|
|
204
|
+
|
|
205
|
+
IMPORTED = 16
|
|
206
|
+
|
|
207
|
+
EXPORTED = 8
|
|
208
|
+
|
|
209
|
+
CONSTRUCTOR = 1
|
|
210
|
+
|
|
211
|
+
DESTRUCTOR = 2
|
|
212
|
+
|
|
213
|
+
DEBUG_INFO = 4
|
|
214
|
+
|
|
215
|
+
def add(self, flag: Function.FLAGS) -> Function: ...
|
|
216
|
+
|
|
217
|
+
def has(self, flag: Function.FLAGS) -> bool: ...
|
|
218
|
+
|
|
207
219
|
@property
|
|
208
|
-
def flags(self) ->
|
|
220
|
+
def flags(self) -> Function.FLAGS: ...
|
|
221
|
+
|
|
222
|
+
@property
|
|
223
|
+
def flags_list(self) -> list[Function.FLAGS]: ...
|
|
224
|
+
|
|
225
|
+
address: int
|
|
226
|
+
|
|
227
|
+
def __str__(self) -> str: ...
|
|
209
228
|
|
|
210
229
|
class Header(Object):
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
230
|
+
class ARCHITECTURES(enum.Enum):
|
|
231
|
+
@staticmethod
|
|
232
|
+
def from_value(arg: int, /) -> Header.ARCHITECTURES: ...
|
|
233
|
+
|
|
234
|
+
def __eq__(self, arg, /) -> bool: ...
|
|
235
|
+
|
|
236
|
+
def __ne__(self, arg, /) -> bool: ...
|
|
237
|
+
|
|
238
|
+
def __int__(self) -> int: ...
|
|
239
|
+
|
|
240
|
+
UNKNOWN = 0
|
|
241
|
+
|
|
242
|
+
ARM = 1
|
|
243
|
+
|
|
244
|
+
ARM64 = 2
|
|
245
|
+
|
|
246
|
+
MIPS = 3
|
|
247
|
+
|
|
248
|
+
X86 = 4
|
|
249
|
+
|
|
250
|
+
X86_64 = 5
|
|
251
|
+
|
|
252
|
+
PPC = 6
|
|
253
|
+
|
|
254
|
+
SPARC = 7
|
|
255
|
+
|
|
256
|
+
SYSZ = 8
|
|
257
|
+
|
|
258
|
+
XCORE = 9
|
|
259
|
+
|
|
260
|
+
RISCV = 10
|
|
261
|
+
|
|
262
|
+
LOONGARCH = 11
|
|
263
|
+
|
|
264
|
+
class ENDIANNESS(enum.Enum):
|
|
265
|
+
@staticmethod
|
|
266
|
+
def from_value(arg: int, /) -> Header.ENDIANNESS: ...
|
|
267
|
+
|
|
268
|
+
def __eq__(self, arg, /) -> bool: ...
|
|
269
|
+
|
|
270
|
+
def __ne__(self, arg, /) -> bool: ...
|
|
271
|
+
|
|
272
|
+
def __int__(self) -> int: ...
|
|
273
|
+
|
|
274
|
+
UNKNOWN = 0
|
|
275
|
+
|
|
276
|
+
BIG = 1
|
|
277
|
+
|
|
278
|
+
LITTLE = 2
|
|
279
|
+
|
|
280
|
+
class MODES(enum.Enum):
|
|
281
|
+
@staticmethod
|
|
282
|
+
def from_value(arg: int, /) -> Header.MODES: ...
|
|
283
|
+
|
|
284
|
+
def __eq__(self, arg, /) -> bool: ...
|
|
285
|
+
|
|
286
|
+
def __ne__(self, arg, /) -> bool: ...
|
|
287
|
+
|
|
288
|
+
def __int__(self) -> int: ...
|
|
289
|
+
|
|
290
|
+
NONE = 0
|
|
291
|
+
|
|
292
|
+
BITS_16 = 1
|
|
293
|
+
|
|
294
|
+
BITS_32 = 2
|
|
295
|
+
|
|
296
|
+
BITS_64 = 4
|
|
297
|
+
|
|
298
|
+
THUMB = 8
|
|
299
|
+
|
|
300
|
+
ARM64E = 16
|
|
301
|
+
|
|
302
|
+
class OBJECT_TYPES(enum.Enum):
|
|
303
|
+
@staticmethod
|
|
304
|
+
def from_value(arg: int, /) -> Header.OBJECT_TYPES: ...
|
|
305
|
+
|
|
306
|
+
def __eq__(self, arg, /) -> bool: ...
|
|
307
|
+
|
|
308
|
+
def __ne__(self, arg, /) -> bool: ...
|
|
309
|
+
|
|
310
|
+
def __int__(self) -> int: ...
|
|
311
|
+
|
|
312
|
+
UNKNOWN = 0
|
|
313
|
+
|
|
314
|
+
EXECUTABLE = 1
|
|
315
|
+
|
|
316
|
+
LIBRARY = 2
|
|
317
|
+
|
|
318
|
+
OBJECT = 3
|
|
319
|
+
|
|
320
|
+
@property
|
|
321
|
+
def architecture(self) -> Header.ARCHITECTURES: ...
|
|
322
|
+
|
|
323
|
+
@property
|
|
324
|
+
def modes(self) -> Header.MODES: ...
|
|
325
|
+
|
|
326
|
+
@property
|
|
327
|
+
def modes_list(self) -> list[Header.MODES]: ...
|
|
328
|
+
|
|
329
|
+
@property
|
|
330
|
+
def entrypoint(self) -> int: ...
|
|
331
|
+
|
|
332
|
+
@property
|
|
333
|
+
def object_type(self) -> Header.OBJECT_TYPES: ...
|
|
334
|
+
|
|
335
|
+
@property
|
|
336
|
+
def endianness(self) -> Header.ENDIANNESS: ...
|
|
337
|
+
|
|
217
338
|
@property
|
|
218
339
|
def is_32(self) -> bool: ...
|
|
340
|
+
|
|
219
341
|
@property
|
|
220
342
|
def is_64(self) -> bool: ...
|
|
221
343
|
|
|
222
|
-
|
|
223
|
-
ARM: ClassVar[MODES] = ...
|
|
224
|
-
M16: ClassVar[MODES] = ...
|
|
225
|
-
M32: ClassVar[MODES] = ...
|
|
226
|
-
M64: ClassVar[MODES] = ...
|
|
227
|
-
MCLASS: ClassVar[MODES] = ...
|
|
228
|
-
MIPS3: ClassVar[MODES] = ...
|
|
229
|
-
MIPS32: ClassVar[MODES] = ...
|
|
230
|
-
MIPS32R6: ClassVar[MODES] = ...
|
|
231
|
-
MIPS64: ClassVar[MODES] = ...
|
|
232
|
-
MIPSGP64: ClassVar[MODES] = ...
|
|
233
|
-
NONE: ClassVar[MODES] = ...
|
|
234
|
-
THUMB: ClassVar[MODES] = ...
|
|
235
|
-
UNDEFINED: ClassVar[MODES] = ...
|
|
236
|
-
V7: ClassVar[MODES] = ...
|
|
237
|
-
V8: ClassVar[MODES] = ...
|
|
238
|
-
V9: ClassVar[MODES] = ...
|
|
239
|
-
__name__: str
|
|
240
|
-
def __init__(self, *args, **kwargs) -> None: ...
|
|
241
|
-
@staticmethod
|
|
242
|
-
def from_value(arg: int, /) -> lief.MODES: ...
|
|
243
|
-
def __ge__(self, other) -> bool: ...
|
|
244
|
-
def __gt__(self, other) -> bool: ...
|
|
245
|
-
def __hash__(self) -> int: ...
|
|
246
|
-
def __index__(self) -> Any: ...
|
|
247
|
-
def __int__(self) -> int: ...
|
|
248
|
-
def __le__(self, other) -> bool: ...
|
|
249
|
-
def __lt__(self, other) -> bool: ...
|
|
250
|
-
@property
|
|
251
|
-
def value(self) -> int: ...
|
|
252
|
-
|
|
253
|
-
class OBJECT_TYPES:
|
|
254
|
-
EXECUTABLE: ClassVar[OBJECT_TYPES] = ...
|
|
255
|
-
LIBRARY: ClassVar[OBJECT_TYPES] = ...
|
|
256
|
-
NONE: ClassVar[OBJECT_TYPES] = ...
|
|
257
|
-
OBJECT: ClassVar[OBJECT_TYPES] = ...
|
|
258
|
-
__name__: str
|
|
259
|
-
def __init__(self, *args, **kwargs) -> None: ...
|
|
260
|
-
@staticmethod
|
|
261
|
-
def from_value(arg: int, /) -> lief.OBJECT_TYPES: ...
|
|
262
|
-
def __ge__(self, other) -> bool: ...
|
|
263
|
-
def __gt__(self, other) -> bool: ...
|
|
264
|
-
def __hash__(self) -> int: ...
|
|
265
|
-
def __index__(self) -> Any: ...
|
|
266
|
-
def __int__(self) -> int: ...
|
|
267
|
-
def __le__(self, other) -> bool: ...
|
|
268
|
-
def __lt__(self, other) -> bool: ...
|
|
269
|
-
@property
|
|
270
|
-
def value(self) -> int: ...
|
|
344
|
+
def __str__(self) -> str: ...
|
|
271
345
|
|
|
272
346
|
class Object:
|
|
273
|
-
def __init__(self, *args, **kwargs) -> None: ...
|
|
274
347
|
def __hash__(self) -> int: ...
|
|
275
348
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
LINUX: ClassVar[PLATFORMS] = ...
|
|
280
|
-
OSX: ClassVar[PLATFORMS] = ...
|
|
281
|
-
UNKNOWN: ClassVar[PLATFORMS] = ...
|
|
282
|
-
WINDOWS: ClassVar[PLATFORMS] = ...
|
|
283
|
-
__name__: str
|
|
284
|
-
def __init__(self, *args, **kwargs) -> None: ...
|
|
349
|
+
def __eq__(self, arg, /) -> bool: ...
|
|
350
|
+
|
|
351
|
+
class PLATFORMS(enum.Enum):
|
|
285
352
|
@staticmethod
|
|
286
|
-
def from_value(arg: int, /) ->
|
|
287
|
-
|
|
288
|
-
def
|
|
289
|
-
|
|
290
|
-
def
|
|
353
|
+
def from_value(arg: int, /) -> PLATFORMS: ...
|
|
354
|
+
|
|
355
|
+
def __eq__(self, arg, /) -> bool: ...
|
|
356
|
+
|
|
357
|
+
def __ne__(self, arg, /) -> bool: ...
|
|
358
|
+
|
|
291
359
|
def __int__(self) -> int: ...
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
360
|
+
|
|
361
|
+
UNKNOWN = 3
|
|
362
|
+
|
|
363
|
+
LINUX = 1
|
|
364
|
+
|
|
365
|
+
ANDROID = 2
|
|
366
|
+
|
|
367
|
+
WINDOWS = 3
|
|
368
|
+
|
|
369
|
+
IOS = 4
|
|
370
|
+
|
|
371
|
+
OSX = 5
|
|
296
372
|
|
|
297
373
|
class Relocation(Object):
|
|
298
374
|
address: int
|
|
375
|
+
|
|
299
376
|
size: int
|
|
300
|
-
|
|
377
|
+
|
|
378
|
+
def __str__(self) -> str: ...
|
|
301
379
|
|
|
302
380
|
class Section(Object):
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
381
|
+
name: Union[str, bytes]
|
|
382
|
+
|
|
383
|
+
@property
|
|
384
|
+
def fullname(self) -> bytes: ...
|
|
385
|
+
|
|
306
386
|
size: int
|
|
387
|
+
|
|
388
|
+
offset: int
|
|
389
|
+
|
|
307
390
|
virtual_address: int
|
|
308
|
-
|
|
391
|
+
|
|
392
|
+
content: memoryview
|
|
393
|
+
|
|
394
|
+
@property
|
|
395
|
+
def entropy(self) -> float: ...
|
|
396
|
+
|
|
309
397
|
@overload
|
|
310
|
-
def search(self, number: int, pos: int =
|
|
398
|
+
def search(self, number: int, pos: int = 0, size: int = 0) -> Optional[int]: ...
|
|
399
|
+
|
|
311
400
|
@overload
|
|
312
|
-
def search(self, str: str, pos: int =
|
|
401
|
+
def search(self, str: str, pos: int = 0) -> Optional[int]: ...
|
|
402
|
+
|
|
313
403
|
@overload
|
|
314
|
-
def search(self, bytes: bytes, pos: int =
|
|
404
|
+
def search(self, bytes: bytes, pos: int = 0) -> Optional[int]: ...
|
|
405
|
+
|
|
315
406
|
@overload
|
|
316
|
-
def search_all(self, number: int, size: int =
|
|
407
|
+
def search_all(self, number: int, size: int = 0) -> list[int]: ...
|
|
408
|
+
|
|
317
409
|
@overload
|
|
318
410
|
def search_all(self, str: str) -> list[int]: ...
|
|
319
|
-
|
|
320
|
-
def
|
|
321
|
-
@property
|
|
322
|
-
def fullname(self) -> bytes: ...
|
|
411
|
+
|
|
412
|
+
def __str__(self) -> str: ...
|
|
323
413
|
|
|
324
414
|
class Symbol(Object):
|
|
325
|
-
name: Union[str,bytes]
|
|
326
|
-
|
|
415
|
+
name: Union[str, bytes]
|
|
416
|
+
|
|
327
417
|
value: int
|
|
328
|
-
|
|
418
|
+
|
|
419
|
+
size: int
|
|
420
|
+
|
|
421
|
+
def __str__(self) -> str: ...
|
|
422
|
+
|
|
423
|
+
__commit__: str = ...
|
|
424
|
+
|
|
425
|
+
__extended__: bool = ...
|
|
426
|
+
|
|
427
|
+
__is_tagged__: bool = ...
|
|
428
|
+
|
|
429
|
+
__tag__: str = ...
|
|
430
|
+
|
|
431
|
+
def current_platform() -> PLATFORMS: ...
|
|
329
432
|
|
|
330
433
|
class debug_location_t:
|
|
331
|
-
file: str
|
|
332
434
|
line: int
|
|
333
|
-
def __init__(self, *args, **kwargs) -> None: ...
|
|
334
|
-
|
|
335
|
-
class lief_errors:
|
|
336
|
-
asn1_bad_tag: ClassVar[lief_errors] = ...
|
|
337
|
-
build_error: ClassVar[lief_errors] = ...
|
|
338
|
-
conversion_error: ClassVar[lief_errors] = ...
|
|
339
|
-
corrupted: ClassVar[lief_errors] = ...
|
|
340
|
-
data_too_large: ClassVar[lief_errors] = ...
|
|
341
|
-
file_error: ClassVar[lief_errors] = ...
|
|
342
|
-
file_format_error: ClassVar[lief_errors] = ...
|
|
343
|
-
not_found: ClassVar[lief_errors] = ...
|
|
344
|
-
not_implemented: ClassVar[lief_errors] = ...
|
|
345
|
-
not_supported: ClassVar[lief_errors] = ...
|
|
346
|
-
parsing_error: ClassVar[lief_errors] = ...
|
|
347
|
-
read_error: ClassVar[lief_errors] = ...
|
|
348
|
-
read_out_of_bound: ClassVar[lief_errors] = ...
|
|
349
|
-
__name__: str
|
|
350
|
-
def __init__(self, *args, **kwargs) -> None: ...
|
|
351
|
-
def __ge__(self, other) -> bool: ...
|
|
352
|
-
def __gt__(self, other) -> bool: ...
|
|
353
|
-
def __hash__(self) -> int: ...
|
|
354
|
-
def __index__(self) -> Any: ...
|
|
355
|
-
def __int__(self) -> int: ...
|
|
356
|
-
def __le__(self, other) -> bool: ...
|
|
357
|
-
def __lt__(self, other) -> bool: ...
|
|
358
435
|
|
|
359
|
-
|
|
360
|
-
def __init__(self, *args, **kwargs) -> None: ...
|
|
361
|
-
def __bool__(self) -> bool: ...
|
|
362
|
-
@property
|
|
363
|
-
def error(self) -> lief_errors: ...
|
|
364
|
-
@property
|
|
365
|
-
def is_error(self) -> bool: ...
|
|
366
|
-
@property
|
|
367
|
-
def is_value(self) -> bool: ...
|
|
368
|
-
@property
|
|
369
|
-
def value(self) -> lief.ok_t: ...
|
|
436
|
+
file: str
|
|
370
437
|
|
|
371
|
-
|
|
372
|
-
def __init__(self, *args, **kwargs) -> None: ...
|
|
373
|
-
def __bool__(self) -> bool: ...
|
|
438
|
+
def __repr__(self) -> str: ...
|
|
374
439
|
|
|
375
|
-
|
|
376
|
-
high: int
|
|
377
|
-
low: int
|
|
378
|
-
def __init__(self, *args, **kwargs) -> None: ...
|
|
379
|
-
@property
|
|
380
|
-
def size(self) -> int: ...
|
|
440
|
+
def demangle(mangled: str) -> Optional[str]: ...
|
|
381
441
|
|
|
382
|
-
def current_platform() -> lief.PLATFORMS: ...
|
|
383
442
|
def disable_leak_warning() -> None: ...
|
|
443
|
+
|
|
384
444
|
@overload
|
|
385
|
-
def hash(arg:
|
|
445
|
+
def hash(arg: Object, /) -> int: ... # type: ignore
|
|
446
|
+
|
|
386
447
|
@overload
|
|
387
|
-
def hash(arg:
|
|
448
|
+
def hash(arg: Sequence[int], /) -> int: ... # type: ignore
|
|
449
|
+
|
|
388
450
|
@overload
|
|
389
|
-
def hash(arg: bytes, /) -> int: ...
|
|
451
|
+
def hash(arg: bytes, /) -> int: ... # type: ignore
|
|
452
|
+
|
|
390
453
|
@overload
|
|
391
|
-
def hash(arg: str, /) -> int: ...
|
|
454
|
+
def hash(arg: str, /) -> int: ... # type: ignore
|
|
455
|
+
|
|
392
456
|
@overload
|
|
393
457
|
def is_art(path: str) -> bool: ...
|
|
458
|
+
|
|
394
459
|
@overload
|
|
395
|
-
def is_art(raw:
|
|
460
|
+
def is_art(raw: Sequence[int]) -> bool: ...
|
|
461
|
+
|
|
396
462
|
@overload
|
|
397
463
|
def is_dex(path: str) -> bool: ...
|
|
464
|
+
|
|
398
465
|
@overload
|
|
399
|
-
def is_dex(raw:
|
|
466
|
+
def is_dex(raw: Sequence[int]) -> bool: ...
|
|
467
|
+
|
|
400
468
|
@overload
|
|
401
469
|
def is_elf(filename: str) -> bool: ...
|
|
470
|
+
|
|
402
471
|
@overload
|
|
403
|
-
def is_elf(raw:
|
|
472
|
+
def is_elf(raw: Sequence[int]) -> bool: ...
|
|
473
|
+
|
|
404
474
|
@overload
|
|
405
475
|
def is_macho(filename: str) -> bool: ...
|
|
476
|
+
|
|
406
477
|
@overload
|
|
407
|
-
def is_macho(raw:
|
|
478
|
+
def is_macho(raw: Sequence[int]) -> bool: ...
|
|
479
|
+
|
|
408
480
|
@overload
|
|
409
|
-
def is_oat(binary:
|
|
481
|
+
def is_oat(binary: ELF.Binary) -> bool: ...
|
|
482
|
+
|
|
410
483
|
@overload
|
|
411
484
|
def is_oat(path: str) -> bool: ...
|
|
485
|
+
|
|
412
486
|
@overload
|
|
413
|
-
def is_oat(raw:
|
|
487
|
+
def is_oat(raw: Sequence[int]) -> bool: ...
|
|
488
|
+
|
|
414
489
|
@overload
|
|
415
490
|
def is_pe(file: str) -> bool: ...
|
|
491
|
+
|
|
416
492
|
@overload
|
|
417
|
-
def is_pe(raw:
|
|
493
|
+
def is_pe(raw: Sequence[int]) -> bool: ...
|
|
494
|
+
|
|
418
495
|
@overload
|
|
419
496
|
def is_vdex(path: str) -> bool: ...
|
|
497
|
+
|
|
420
498
|
@overload
|
|
421
|
-
def is_vdex(raw:
|
|
499
|
+
def is_vdex(raw: Sequence[int]) -> bool: ...
|
|
500
|
+
|
|
501
|
+
class lief_errors(enum.Enum):
|
|
502
|
+
read_error = 1
|
|
503
|
+
|
|
504
|
+
not_found = 2
|
|
505
|
+
|
|
506
|
+
not_implemented = 3
|
|
507
|
+
|
|
508
|
+
not_supported = 4
|
|
509
|
+
|
|
510
|
+
corrupted = 5
|
|
511
|
+
|
|
512
|
+
conversion_error = 6
|
|
513
|
+
|
|
514
|
+
read_out_of_bound = 7
|
|
515
|
+
|
|
516
|
+
asn1_bad_tag = 8
|
|
517
|
+
|
|
518
|
+
file_error = 9
|
|
519
|
+
|
|
520
|
+
file_format_error = 10
|
|
521
|
+
|
|
522
|
+
parsing_error = 11
|
|
523
|
+
|
|
524
|
+
build_error = 12
|
|
525
|
+
|
|
526
|
+
data_too_large = 13
|
|
527
|
+
|
|
528
|
+
require_extended_version = 14
|
|
529
|
+
|
|
530
|
+
class ok_error_t:
|
|
531
|
+
@property
|
|
532
|
+
def is_error(self) -> bool: ...
|
|
533
|
+
|
|
534
|
+
@property
|
|
535
|
+
def is_value(self) -> bool: ...
|
|
536
|
+
|
|
537
|
+
@property
|
|
538
|
+
def error(self) -> lief_errors: ...
|
|
539
|
+
|
|
540
|
+
@property
|
|
541
|
+
def value(self) -> ok_t: ...
|
|
542
|
+
|
|
543
|
+
def __bool__(self) -> bool: ...
|
|
544
|
+
|
|
545
|
+
class ok_t:
|
|
546
|
+
def __bool__(self) -> bool: ...
|
|
547
|
+
|
|
422
548
|
@overload
|
|
423
|
-
def parse(raw: bytes) -> Optional[
|
|
549
|
+
def parse(raw: bytes) -> Optional[Binary]: ...
|
|
550
|
+
|
|
424
551
|
@overload
|
|
425
|
-
def parse(filepath: str) -> Optional[
|
|
552
|
+
def parse(filepath: str) -> Optional[Binary]: ...
|
|
553
|
+
|
|
426
554
|
@overload
|
|
427
|
-
def parse(obj: Union[io.IOBase|os.PathLike]) -> Optional[
|
|
428
|
-
|
|
555
|
+
def parse(obj: Union[io.IOBase | os.PathLike]) -> Optional[Binary]: ...
|
|
556
|
+
|
|
557
|
+
class range_t:
|
|
558
|
+
low: int
|
|
559
|
+
|
|
560
|
+
high: int
|
|
561
|
+
|
|
562
|
+
@property
|
|
563
|
+
def size(self) -> int: ...
|
|
564
|
+
|
|
565
|
+
def __repr__(self) -> str: ...
|
|
566
|
+
|
|
567
|
+
def __str__(self) -> str: ...
|
|
568
|
+
|
|
569
|
+
def to_json(arg: Object, /) -> str: ...
|