lief 0.16.5__cp312-cp312-win_arm64.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/OAT/__init__.pyi ADDED
@@ -0,0 +1,348 @@
1
+ from collections.abc import Sequence
2
+ import enum
3
+ import io
4
+ import os
5
+ from typing import Iterator, Optional, Union, overload
6
+
7
+ import lief
8
+
9
+
10
+ class Binary(lief.ELF.Binary):
11
+ class it_dex_files:
12
+ def __getitem__(self, arg: int, /) -> lief.DEX.File: ...
13
+
14
+ def __len__(self) -> int: ...
15
+
16
+ def __iter__(self) -> Binary.it_dex_files: ...
17
+
18
+ def __next__(self) -> lief.DEX.File: ...
19
+
20
+ class it_oat_dex_files:
21
+ def __getitem__(self, arg: int, /) -> DexFile: ...
22
+
23
+ def __len__(self) -> int: ...
24
+
25
+ def __iter__(self) -> Binary.it_oat_dex_files: ...
26
+
27
+ def __next__(self) -> DexFile: ...
28
+
29
+ class it_classes:
30
+ def __getitem__(self, arg: int, /) -> Class: ...
31
+
32
+ def __len__(self) -> int: ...
33
+
34
+ def __iter__(self) -> Binary.it_classes: ...
35
+
36
+ def __next__(self) -> Class: ...
37
+
38
+ class it_methods:
39
+ def __getitem__(self, arg: int, /) -> Method: ...
40
+
41
+ def __len__(self) -> int: ...
42
+
43
+ def __iter__(self) -> Binary.it_methods: ...
44
+
45
+ def __next__(self) -> Method: ...
46
+
47
+ @property
48
+ def header(self) -> Header: ... # type: ignore
49
+
50
+ @property
51
+ def dex_files(self) -> Binary.it_dex_files: ...
52
+
53
+ @property
54
+ def oat_dex_files(self) -> Binary.it_oat_dex_files: ...
55
+
56
+ @property
57
+ def classes(self) -> Binary.it_classes: ...
58
+
59
+ @property
60
+ def methods(self) -> Binary.it_methods: ...
61
+
62
+ def has_class(self, arg: str, /) -> bool: ...
63
+
64
+ @overload
65
+ def get_class(self, class_name: str) -> Class: ...
66
+
67
+ @overload
68
+ def get_class(self, class_index: int) -> Class: ...
69
+
70
+ @property
71
+ def dex2dex_json_info(self) -> str: ...
72
+
73
+ def __str__(self) -> str: ...
74
+
75
+ class Class(lief.Object):
76
+ def __init__(self) -> None: ...
77
+
78
+ class it_methods:
79
+ def __getitem__(self, arg: int, /) -> Method: ...
80
+
81
+ def __len__(self) -> int: ...
82
+
83
+ def __iter__(self) -> Class.it_methods: ...
84
+
85
+ def __next__(self) -> Method: ...
86
+
87
+ def has_dex_class(self) -> bool: ...
88
+
89
+ @property
90
+ def status(self) -> OAT_CLASS_STATUS: ...
91
+
92
+ @property
93
+ def type(self) -> OAT_CLASS_TYPES: ...
94
+
95
+ @property
96
+ def fullname(self) -> str: ...
97
+
98
+ @property
99
+ def index(self) -> int: ...
100
+
101
+ @property
102
+ def methods(self) -> Class.it_methods: ...
103
+
104
+ @property
105
+ def bitmap(self) -> list[int]: ...
106
+
107
+ @overload
108
+ def is_quickened(self, dex_method: lief.DEX.Method) -> bool: ...
109
+
110
+ @overload
111
+ def is_quickened(self, method_index: int) -> bool: ...
112
+
113
+ @overload
114
+ def method_offsets_index(self, arg: lief.DEX.Method, /) -> int: ...
115
+
116
+ @overload
117
+ def method_offsets_index(self, arg: int, /) -> int: ...
118
+
119
+ def __str__(self) -> str: ...
120
+
121
+ class DexFile(lief.Object):
122
+ def __init__(self) -> None: ...
123
+
124
+ location: str
125
+
126
+ checksum: int
127
+
128
+ dex_offset: int
129
+
130
+ @property
131
+ def has_dex_file(self) -> bool: ...
132
+
133
+ @property
134
+ def dex_file(self) -> lief.DEX.File: ...
135
+
136
+ def __str__(self) -> str: ...
137
+
138
+ class HEADER_KEYS(enum.Enum):
139
+ IMAGE_LOCATION = 0
140
+
141
+ DEX2OAT_CMD_LINE = 1
142
+
143
+ DEX2OAT_HOST = 2
144
+
145
+ PIC = 3
146
+
147
+ HAS_PATCH_INFO = 4
148
+
149
+ DEBUGGABLE = 5
150
+
151
+ NATIVE_DEBUGGABLE = 6
152
+
153
+ COMPILER_FILTER = 7
154
+
155
+ CLASS_PATH = 8
156
+
157
+ BOOT_CLASS_PATH = 9
158
+
159
+ CONCURRENT_COPYING = 10
160
+
161
+ class Header(lief.Object):
162
+ def __init__(self) -> None: ...
163
+
164
+ class it_key_values_t:
165
+ def __getitem__(self, arg: int, /) -> Header.element_t: ...
166
+
167
+ def __len__(self) -> int: ...
168
+
169
+ def __iter__(self) -> Header.it_key_values_t: ...
170
+
171
+ def __next__(self) -> Header.element_t: ...
172
+
173
+ class element_t:
174
+ key: lief.OAT.HEADER_KEYS
175
+
176
+ value: str
177
+
178
+ @property
179
+ def key_values(self) -> Header.it_key_values_t: ...
180
+
181
+ @property
182
+ def keys(self) -> list[HEADER_KEYS]: ...
183
+
184
+ @property
185
+ def values(self) -> list[str]: ...
186
+
187
+ @property
188
+ def magic(self) -> list[int]: ...
189
+
190
+ @property
191
+ def version(self) -> int: ...
192
+
193
+ @property
194
+ def checksum(self) -> int: ...
195
+
196
+ @property
197
+ def instruction_set(self) -> INSTRUCTION_SETS: ...
198
+
199
+ @property
200
+ def nb_dex_files(self) -> int: ...
201
+
202
+ @property
203
+ def oat_dex_files_offset(self) -> int: ...
204
+
205
+ @property
206
+ def executable_offset(self) -> int: ...
207
+
208
+ @property
209
+ def i2i_bridge_offset(self) -> int: ...
210
+
211
+ @property
212
+ def i2c_code_bridge_offset(self) -> int: ...
213
+
214
+ @property
215
+ def jni_dlsym_lookup_offset(self) -> int: ...
216
+
217
+ @property
218
+ def quick_generic_jni_trampoline_offset(self) -> int: ...
219
+
220
+ @property
221
+ def quick_imt_conflict_trampoline_offset(self) -> int: ...
222
+
223
+ @property
224
+ def quick_resolution_trampoline_offset(self) -> int: ...
225
+
226
+ @property
227
+ def quick_to_interpreter_bridge_offset(self) -> int: ...
228
+
229
+ @property
230
+ def image_patch_delta(self) -> int: ...
231
+
232
+ @property
233
+ def image_file_location_oat_checksum(self) -> int: ...
234
+
235
+ @property
236
+ def image_file_location_oat_data_begin(self) -> int: ...
237
+
238
+ @property
239
+ def key_value_size(self) -> int: ...
240
+
241
+ def get(self, key: HEADER_KEYS) -> str: ...
242
+
243
+ def set(self, key: HEADER_KEYS, value: str) -> Header: ...
244
+
245
+ def __getitem__(self, arg: HEADER_KEYS, /) -> str: ...
246
+
247
+ def __setitem__(self, arg0: HEADER_KEYS, arg1: str, /) -> Header: ...
248
+
249
+ def __str__(self) -> str: ...
250
+
251
+ class INSTRUCTION_SETS(enum.Enum):
252
+ NONE = 0
253
+
254
+ ARM = 1
255
+
256
+ ARM_64 = 2
257
+
258
+ THUMB2 = 3
259
+
260
+ X86 = 4
261
+
262
+ X86_64 = 5
263
+
264
+ MIPS = 6
265
+
266
+ MIPS_64 = 7
267
+
268
+ class Method(lief.Object):
269
+ def __init__(self) -> None: ...
270
+
271
+ @property
272
+ def name(self) -> str: ...
273
+
274
+ @property
275
+ def oat_class(self) -> Class: ...
276
+
277
+ @property
278
+ def dex_method(self) -> lief.DEX.Method: ...
279
+
280
+ @property
281
+ def has_dex_method(self) -> bool: ...
282
+
283
+ @property
284
+ def is_dex2dex_optimized(self) -> bool: ...
285
+
286
+ @property
287
+ def is_compiled(self) -> bool: ...
288
+
289
+ quick_code: list[int]
290
+
291
+ def __str__(self) -> str: ...
292
+
293
+ class OAT_CLASS_STATUS(enum.Enum):
294
+ RETIRED = -2
295
+
296
+ ERROR = -1
297
+
298
+ NOTREADY = 0
299
+
300
+ IDX = 1
301
+
302
+ LOADED = 2
303
+
304
+ RESOLVING = 3
305
+
306
+ RESOLVED = 4
307
+
308
+ VERIFYING = 5
309
+
310
+ VERIFICATION_AT_RUNTIME = 6
311
+
312
+ VERIFYING_AT_RUNTIME = 7
313
+
314
+ VERIFIED = 8
315
+
316
+ INITIALIZING = 9
317
+
318
+ INITIALIZED = 10
319
+
320
+ class OAT_CLASS_TYPES(enum.Enum):
321
+ ALL_COMPILED = 0
322
+
323
+ SOME_COMPILED = 1
324
+
325
+ NONE_COMPILED = 2
326
+
327
+ def android_version(arg: int, /) -> lief.Android.ANDROID_VERSIONS: ...
328
+
329
+ @overload
330
+ def parse(oat_file: str) -> Optional[Binary]: ...
331
+
332
+ @overload
333
+ def parse(oat_file: str, vdex_file: str) -> Optional[Binary]: ...
334
+
335
+ @overload
336
+ def parse(raw: Sequence[int]) -> Optional[Binary]: ...
337
+
338
+ @overload
339
+ def parse(obj: Union[io.IOBase | os.PathLike]) -> Optional[Binary]: ...
340
+
341
+ @overload
342
+ def version(binary: lief.ELF.Binary) -> int: ...
343
+
344
+ @overload
345
+ def version(file: str) -> int: ...
346
+
347
+ @overload
348
+ def version(raw: Sequence[int]) -> int: ...