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