lief 0.15.1__cp313-cp313-macosx_11_0_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/ART.pyi ADDED
@@ -0,0 +1,81 @@
1
+ from typing import Any, ClassVar, Optional, Union
2
+
3
+ from typing import overload
4
+ import io
5
+ import lief.ART # type: ignore
6
+ import lief.Android # type: ignore
7
+ import os
8
+
9
+ class File(lief.Object):
10
+ def __init__(self, *args, **kwargs) -> None: ...
11
+ @property
12
+ def header(self) -> lief.ART.Header: ...
13
+
14
+ class Header(lief.Object):
15
+ def __init__(self, *args, **kwargs) -> None: ...
16
+ @property
17
+ def boot_image_begin(self) -> int: ...
18
+ @property
19
+ def boot_image_size(self) -> int: ...
20
+ @property
21
+ def boot_oat_begin(self) -> int: ...
22
+ @property
23
+ def boot_oat_size(self) -> int: ...
24
+ @property
25
+ def compile_pic(self) -> bool: ...
26
+ @property
27
+ def data_size(self) -> int: ...
28
+ @property
29
+ def image_begin(self) -> int: ...
30
+ @property
31
+ def image_roots(self) -> int: ...
32
+ @property
33
+ def image_size(self) -> int: ...
34
+ @property
35
+ def magic(self) -> list[int]: ...
36
+ @property
37
+ def nb_methods(self) -> int: ...
38
+ @property
39
+ def nb_sections(self) -> int: ...
40
+ @property
41
+ def oat_checksum(self) -> int: ...
42
+ @property
43
+ def oat_data_end(self) -> int: ...
44
+ @property
45
+ def oat_file_begin(self) -> int: ...
46
+ @property
47
+ def oat_file_end(self) -> int: ...
48
+ @property
49
+ def patch_delta(self) -> int: ...
50
+ @property
51
+ def pointer_size(self) -> int: ...
52
+ @property
53
+ def storage_mode(self) -> lief.ART.STORAGE_MODES: ...
54
+ @property
55
+ def version(self) -> int: ...
56
+
57
+ class STORAGE_MODES:
58
+ LZ4: ClassVar[STORAGE_MODES] = ...
59
+ LZ4HC: ClassVar[STORAGE_MODES] = ...
60
+ UNCOMPRESSED: ClassVar[STORAGE_MODES] = ...
61
+ __name__: str
62
+ def __init__(self, *args, **kwargs) -> None: ...
63
+ def __ge__(self, other) -> bool: ...
64
+ def __gt__(self, other) -> bool: ...
65
+ def __hash__(self) -> int: ...
66
+ def __index__(self) -> Any: ...
67
+ def __int__(self) -> int: ...
68
+ def __le__(self, other) -> bool: ...
69
+ def __lt__(self, other) -> bool: ...
70
+
71
+ def android_version(art_version: int) -> lief.Android.ANDROID_VERSIONS: ...
72
+ @overload
73
+ def parse(filename: str) -> Optional[lief.ART.File]: ...
74
+ @overload
75
+ def parse(raw: list[int], name: str = ...) -> Optional[lief.ART.File]: ...
76
+ @overload
77
+ def parse(obj: Union[io.IOBase|os.PathLike], name: str = ...) -> Optional[lief.ART.File]: ...
78
+ @overload
79
+ def version(file: str) -> int: ...
80
+ @overload
81
+ def version(raw: list[int]) -> int: ...
lief/Android.pyi ADDED
@@ -0,0 +1,29 @@
1
+ from typing import Any, ClassVar
2
+
3
+ import lief.Android # type: ignore
4
+
5
+ class ANDROID_VERSIONS:
6
+ UNKNOWN: ClassVar[ANDROID_VERSIONS] = ...
7
+ VERSION_601: ClassVar[ANDROID_VERSIONS] = ...
8
+ VERSION_700: ClassVar[ANDROID_VERSIONS] = ...
9
+ VERSION_710: ClassVar[ANDROID_VERSIONS] = ...
10
+ VERSION_712: ClassVar[ANDROID_VERSIONS] = ...
11
+ VERSION_800: ClassVar[ANDROID_VERSIONS] = ...
12
+ VERSION_810: ClassVar[ANDROID_VERSIONS] = ...
13
+ VERSION_900: ClassVar[ANDROID_VERSIONS] = ...
14
+ __name__: str
15
+ def __init__(self, *args, **kwargs) -> None: ...
16
+ @staticmethod
17
+ def from_value(arg: int, /) -> lief.Android.ANDROID_VERSIONS: ...
18
+ def __ge__(self, other) -> bool: ...
19
+ def __gt__(self, other) -> bool: ...
20
+ def __hash__(self) -> int: ...
21
+ def __index__(self) -> Any: ...
22
+ def __int__(self) -> int: ...
23
+ def __le__(self, other) -> bool: ...
24
+ def __lt__(self, other) -> bool: ...
25
+ @property
26
+ def value(self) -> int: ...
27
+
28
+ def code_name(version: lief.Android.ANDROID_VERSIONS) -> str: ...
29
+ def version_string(version: lief.Android.ANDROID_VERSIONS) -> str: ...
lief/DEX.pyi ADDED
@@ -0,0 +1,382 @@
1
+ from typing import Any, ClassVar, Optional, Union
2
+
3
+ from typing import overload
4
+ import io
5
+ import lief.DEX # type: ignore
6
+ import lief.DEX.Class # type: ignore
7
+ import lief.DEX.File # type: ignore
8
+ import lief.DEX.MapItem # type: ignore
9
+ import lief.DEX.MapList # type: ignore
10
+ import lief.DEX.Prototype # type: ignore
11
+ import lief.DEX.Type # type: ignore
12
+ import os
13
+
14
+ class ACCESS_FLAGS:
15
+ ABSTRACT: ClassVar[ACCESS_FLAGS] = ...
16
+ ANNOTATION: ClassVar[ACCESS_FLAGS] = ...
17
+ BRIDGE: ClassVar[ACCESS_FLAGS] = ...
18
+ CONSTRUCTOR: ClassVar[ACCESS_FLAGS] = ...
19
+ DECLARED_SYNCHRONIZED: ClassVar[ACCESS_FLAGS] = ...
20
+ ENUM: ClassVar[ACCESS_FLAGS] = ...
21
+ FINAL: ClassVar[ACCESS_FLAGS] = ...
22
+ INTERFACE: ClassVar[ACCESS_FLAGS] = ...
23
+ NATIVE: ClassVar[ACCESS_FLAGS] = ...
24
+ PRIVATE: ClassVar[ACCESS_FLAGS] = ...
25
+ PROTECTED: ClassVar[ACCESS_FLAGS] = ...
26
+ PUBLIC: ClassVar[ACCESS_FLAGS] = ...
27
+ STATIC: ClassVar[ACCESS_FLAGS] = ...
28
+ STRICT: ClassVar[ACCESS_FLAGS] = ...
29
+ SYNCHRONIZED: ClassVar[ACCESS_FLAGS] = ...
30
+ SYNTHETIC: ClassVar[ACCESS_FLAGS] = ...
31
+ TRANSIENT: ClassVar[ACCESS_FLAGS] = ...
32
+ UNKNOWN: ClassVar[ACCESS_FLAGS] = ...
33
+ VARARGS: ClassVar[ACCESS_FLAGS] = ...
34
+ VOLATILE: ClassVar[ACCESS_FLAGS] = ...
35
+ __name__: str
36
+ def __init__(self, *args, **kwargs) -> None: ...
37
+ def __ge__(self, other) -> bool: ...
38
+ def __gt__(self, other) -> bool: ...
39
+ def __hash__(self) -> int: ...
40
+ def __index__(self) -> Any: ...
41
+ def __int__(self) -> int: ...
42
+ def __le__(self, other) -> bool: ...
43
+ def __lt__(self, other) -> bool: ...
44
+
45
+ class Class(lief.Object):
46
+ class it_fields:
47
+ def __init__(self, *args, **kwargs) -> None: ...
48
+ def __getitem__(self, arg: int, /) -> lief.DEX.Field: ...
49
+ def __iter__(self) -> lief.DEX.Class.it_fields: ...
50
+ def __len__(self) -> int: ...
51
+ def __next__(self) -> lief.DEX.Field: ...
52
+
53
+ class it_methods:
54
+ def __init__(self, *args, **kwargs) -> None: ...
55
+ def __getitem__(self, arg: int, /) -> lief.DEX.Method: ...
56
+ def __iter__(self) -> lief.DEX.Class.it_methods: ...
57
+ def __len__(self) -> int: ...
58
+ def __next__(self) -> lief.DEX.Method: ...
59
+
60
+ class it_named_fields:
61
+ def __init__(self, *args, **kwargs) -> None: ...
62
+ def __getitem__(self, arg: int, /) -> lief.DEX.Field: ...
63
+ def __iter__(self) -> lief.DEX.Class.it_named_fields: ...
64
+ def __len__(self) -> int: ...
65
+ def __next__(self) -> lief.DEX.Field: ...
66
+
67
+ class it_named_methods:
68
+ def __init__(self, *args, **kwargs) -> None: ...
69
+ def __getitem__(self, arg: int, /) -> lief.DEX.Method: ...
70
+ def __iter__(self) -> lief.DEX.Class.it_named_methods: ...
71
+ def __len__(self) -> int: ...
72
+ def __next__(self) -> lief.DEX.Method: ...
73
+ def __init__(self, *args, **kwargs) -> None: ...
74
+ def get_field(self, name: str) -> lief.DEX.Class.it_named_fields: ...
75
+ def get_method(self, name: str) -> lief.DEX.Class.it_named_methods: ...
76
+ def has(self, flag: lief.DEX.ACCESS_FLAGS) -> bool: ...
77
+ @property
78
+ def access_flags(self) -> list[lief.DEX.ACCESS_FLAGS]: ...
79
+ @property
80
+ def dex2dex_info(self) -> dict[lief.DEX.Method,dict[int,int]]: ...
81
+ @property
82
+ def fields(self) -> lief.DEX.Class.it_fields: ...
83
+ @property
84
+ def fullname(self) -> str: ...
85
+ @property
86
+ def has_parent(self) -> bool: ...
87
+ @property
88
+ def index(self) -> int: ...
89
+ @property
90
+ def methods(self) -> lief.DEX.Class.it_methods: ...
91
+ @property
92
+ def name(self) -> str: ...
93
+ @property
94
+ def package_name(self) -> str: ...
95
+ @property
96
+ def parent(self) -> lief.DEX.Class: ...
97
+ @property
98
+ def pretty_name(self) -> str: ...
99
+ @property
100
+ def source_filename(self) -> str: ...
101
+
102
+ class CodeInfo(lief.Object):
103
+ def __init__(self, *args, **kwargs) -> None: ...
104
+
105
+ class Field(lief.Object):
106
+ def __init__(self, *args, **kwargs) -> None: ...
107
+ def has(self, flag: lief.DEX.ACCESS_FLAGS) -> bool: ...
108
+ @property
109
+ def access_flags(self) -> list[lief.DEX.ACCESS_FLAGS]: ...
110
+ @property
111
+ def cls(self) -> lief.DEX.Class: ...
112
+ @property
113
+ def has_class(self) -> bool: ...
114
+ @property
115
+ def index(self) -> int: ...
116
+ @property
117
+ def is_static(self) -> bool: ...
118
+ @property
119
+ def name(self) -> str: ...
120
+ @property
121
+ def type(self) -> lief.DEX.Type: ...
122
+
123
+ class File(lief.Object):
124
+ class it_classes:
125
+ def __init__(self, *args, **kwargs) -> None: ...
126
+ def __getitem__(self, arg: int, /) -> lief.DEX.Class: ...
127
+ def __iter__(self) -> lief.DEX.File.it_classes: ...
128
+ def __len__(self) -> int: ...
129
+ def __next__(self) -> lief.DEX.Class: ...
130
+
131
+ class it_fields:
132
+ def __init__(self, *args, **kwargs) -> None: ...
133
+ def __getitem__(self, arg: int, /) -> lief.DEX.Field: ...
134
+ def __iter__(self) -> lief.DEX.File.it_fields: ...
135
+ def __len__(self) -> int: ...
136
+ def __next__(self) -> lief.DEX.Field: ...
137
+
138
+ class it_methods:
139
+ def __init__(self, *args, **kwargs) -> None: ...
140
+ def __getitem__(self, arg: int, /) -> lief.DEX.Method: ...
141
+ def __iter__(self) -> lief.DEX.File.it_methods: ...
142
+ def __len__(self) -> int: ...
143
+ def __next__(self) -> lief.DEX.Method: ...
144
+
145
+ class it_prototypes:
146
+ def __init__(self, *args, **kwargs) -> None: ...
147
+ def __getitem__(self, arg: int, /) -> lief.DEX.Prototype: ...
148
+ def __iter__(self) -> lief.DEX.File.it_prototypes: ...
149
+ def __len__(self) -> int: ...
150
+ def __next__(self) -> lief.DEX.Prototype: ...
151
+
152
+ class it_strings:
153
+ def __init__(self, *args, **kwargs) -> None: ...
154
+ def __getitem__(self, arg: int, /) -> str: ...
155
+ def __iter__(self) -> lief.DEX.File.it_strings: ...
156
+ def __len__(self) -> int: ...
157
+ def __next__(self) -> str: ...
158
+
159
+ class it_types:
160
+ def __init__(self, *args, **kwargs) -> None: ...
161
+ def __getitem__(self, arg: int, /) -> lief.DEX.Type: ...
162
+ def __iter__(self) -> lief.DEX.File.it_types: ...
163
+ def __len__(self) -> int: ...
164
+ def __next__(self) -> lief.DEX.Type: ...
165
+ location: str
166
+ name: str
167
+ def __init__(self, *args, **kwargs) -> None: ...
168
+ @overload
169
+ def get_class(self, classname: str) -> lief.DEX.Class: ...
170
+ @overload
171
+ def get_class(self, classname: int) -> lief.DEX.Class: ...
172
+ def has_class(self, classname: str) -> bool: ...
173
+ def raw(self, deoptimize: bool = ...) -> list[int]: ...
174
+ def save(self, output: str = ..., deoptimize: bool = ...) -> str: ...
175
+ @property
176
+ def classes(self) -> lief.DEX.File.it_classes: ...
177
+ @property
178
+ def dex2dex_json_info(self) -> str: ...
179
+ @property
180
+ def fields(self) -> lief.DEX.File.it_fields: ...
181
+ @property
182
+ def header(self) -> lief.DEX.Header: ...
183
+ @property
184
+ def map(self) -> lief.DEX.MapList: ...
185
+ @property
186
+ def methods(self) -> lief.DEX.File.it_methods: ...
187
+ @property
188
+ def prototypes(self) -> lief.DEX.File.it_prototypes: ...
189
+ @property
190
+ def strings(self) -> lief.DEX.File.it_strings: ...
191
+ @property
192
+ def types(self) -> lief.DEX.File.it_types: ...
193
+ @property
194
+ def version(self) -> int: ...
195
+
196
+ class Header(lief.Object):
197
+ def __init__(self, *args, **kwargs) -> None: ...
198
+ @property
199
+ def checksum(self) -> int: ...
200
+ @property
201
+ def classes(self) -> tuple[int,int]: ...
202
+ @property
203
+ def data(self) -> tuple[int,int]: ...
204
+ @property
205
+ def endian_tag(self) -> int: ...
206
+ @property
207
+ def fields(self) -> tuple[int,int]: ...
208
+ @property
209
+ def file_size(self) -> int: ...
210
+ @property
211
+ def header_size(self) -> int: ...
212
+ @property
213
+ def link(self) -> tuple[int,int]: ...
214
+ @property
215
+ def magic(self) -> list[int]: ...
216
+ @property
217
+ def map_offset(self) -> int: ...
218
+ @property
219
+ def methods(self) -> tuple[int,int]: ...
220
+ @property
221
+ def nb_classes(self) -> int: ...
222
+ @property
223
+ def nb_methods(self) -> int: ...
224
+ @property
225
+ def prototypes(self) -> tuple[int,int]: ...
226
+ @property
227
+ def signature(self) -> list[int]: ...
228
+ @property
229
+ def strings(self) -> tuple[int,int]: ...
230
+ @property
231
+ def types(self) -> tuple[int,int]: ...
232
+
233
+ class MapItem(lief.Object):
234
+ class TYPES:
235
+ ANNOTATION: ClassVar[MapItem.TYPES] = ...
236
+ ANNOTATIONS_DIRECTORY: ClassVar[MapItem.TYPES] = ...
237
+ ANNOTATION_SET: ClassVar[MapItem.TYPES] = ...
238
+ ANNOTATION_SET_REF_LIST: ClassVar[MapItem.TYPES] = ...
239
+ CALL_SITE_ID: ClassVar[MapItem.TYPES] = ...
240
+ CLASS_DATA: ClassVar[MapItem.TYPES] = ...
241
+ CLASS_DEF: ClassVar[MapItem.TYPES] = ...
242
+ CODE: ClassVar[MapItem.TYPES] = ...
243
+ DEBUG_INFO: ClassVar[MapItem.TYPES] = ...
244
+ ENCODED_ARRAY: ClassVar[MapItem.TYPES] = ...
245
+ FIELD_ID: ClassVar[MapItem.TYPES] = ...
246
+ HEADER: ClassVar[MapItem.TYPES] = ...
247
+ MAP_LIST: ClassVar[MapItem.TYPES] = ...
248
+ METHOD_HANDLE: ClassVar[MapItem.TYPES] = ...
249
+ METHOD_ID: ClassVar[MapItem.TYPES] = ...
250
+ PROTO_ID: ClassVar[MapItem.TYPES] = ...
251
+ STRING_DATA: ClassVar[MapItem.TYPES] = ...
252
+ STRING_ID: ClassVar[MapItem.TYPES] = ...
253
+ TYPE_ID: ClassVar[MapItem.TYPES] = ...
254
+ TYPE_LIST: ClassVar[MapItem.TYPES] = ...
255
+ __name__: str
256
+ def __init__(self, *args, **kwargs) -> None: ...
257
+ @staticmethod
258
+ def from_value(arg: int, /) -> lief.DEX.MapItem.TYPES: ...
259
+ def __ge__(self, other) -> bool: ...
260
+ def __gt__(self, other) -> bool: ...
261
+ def __hash__(self) -> int: ...
262
+ def __index__(self) -> Any: ...
263
+ def __int__(self) -> int: ...
264
+ def __le__(self, other) -> bool: ...
265
+ def __lt__(self, other) -> bool: ...
266
+ @property
267
+ def value(self) -> int: ...
268
+ def __init__(self, *args, **kwargs) -> None: ...
269
+ @property
270
+ def offset(self) -> int: ...
271
+ @property
272
+ def size(self) -> int: ...
273
+ @property
274
+ def type(self) -> lief.DEX.MapItem.TYPES: ...
275
+
276
+ class MapList(lief.Object):
277
+ class it_items_t:
278
+ def __init__(self, *args, **kwargs) -> None: ...
279
+ def __getitem__(self, arg: int, /) -> lief.DEX.MapItem: ...
280
+ def __iter__(self) -> lief.DEX.MapList.it_items_t: ...
281
+ def __len__(self) -> int: ...
282
+ def __next__(self) -> lief.DEX.MapItem: ...
283
+ def __init__(self, *args, **kwargs) -> None: ...
284
+ def get(self, type: lief.DEX.MapItem.TYPES) -> lief.DEX.MapItem: ...
285
+ def has(self, type: lief.DEX.MapItem.TYPES) -> bool: ...
286
+ def __getitem__(self, arg: lief.DEX.MapItem.TYPES, /) -> lief.DEX.MapItem: ...
287
+ @property
288
+ def items(self) -> lief.DEX.MapList.it_items_t: ...
289
+
290
+ class Method(lief.Object):
291
+ def __init__(self, *args, **kwargs) -> None: ...
292
+ def has(self, flag: lief.DEX.ACCESS_FLAGS) -> bool: ...
293
+ def insert_dex2dex_info(self, pc: int, index: int) -> None: ...
294
+ @property
295
+ def access_flags(self) -> list[lief.DEX.ACCESS_FLAGS]: ...
296
+ @property
297
+ def bytecode(self) -> list[int]: ...
298
+ @property
299
+ def cls(self) -> lief.DEX.Class: ...
300
+ @property
301
+ def code_offset(self) -> int: ...
302
+ @property
303
+ def has_class(self) -> bool: ...
304
+ @property
305
+ def index(self) -> int: ...
306
+ @property
307
+ def is_virtual(self) -> bool: ...
308
+ @property
309
+ def name(self) -> str: ...
310
+ @property
311
+ def prototype(self) -> lief.DEX.Prototype: ...
312
+
313
+ class Prototype(lief.Object):
314
+ class it_params:
315
+ def __init__(self, *args, **kwargs) -> None: ...
316
+ def __getitem__(self, arg: int, /) -> lief.DEX.Type: ...
317
+ def __iter__(self) -> lief.DEX.Prototype.it_params: ...
318
+ def __len__(self) -> int: ...
319
+ def __next__(self) -> lief.DEX.Type: ...
320
+ def __init__(self, *args, **kwargs) -> None: ...
321
+ @property
322
+ def parameters_type(self) -> lief.DEX.Prototype.it_params: ...
323
+ @property
324
+ def return_type(self) -> lief.DEX.Type: ...
325
+
326
+ class Type(lief.Object):
327
+ class PRIMITIVES:
328
+ BOOLEAN: ClassVar[Type.PRIMITIVES] = ...
329
+ BYTE: ClassVar[Type.PRIMITIVES] = ...
330
+ CHAR: ClassVar[Type.PRIMITIVES] = ...
331
+ DOUBLE: ClassVar[Type.PRIMITIVES] = ...
332
+ FLOAT: ClassVar[Type.PRIMITIVES] = ...
333
+ INT: ClassVar[Type.PRIMITIVES] = ...
334
+ LONG: ClassVar[Type.PRIMITIVES] = ...
335
+ SHORT: ClassVar[Type.PRIMITIVES] = ...
336
+ VOID_T: ClassVar[Type.PRIMITIVES] = ...
337
+ __name__: str
338
+ def __init__(self, *args, **kwargs) -> None: ...
339
+ def __ge__(self, other) -> bool: ...
340
+ def __gt__(self, other) -> bool: ...
341
+ def __hash__(self) -> int: ...
342
+ def __index__(self) -> Any: ...
343
+ def __int__(self) -> int: ...
344
+ def __le__(self, other) -> bool: ...
345
+ def __lt__(self, other) -> bool: ...
346
+
347
+ class TYPES:
348
+ ARRAY: ClassVar[Type.TYPES] = ...
349
+ CLASS: ClassVar[Type.TYPES] = ...
350
+ PRIMITIVE: ClassVar[Type.TYPES] = ...
351
+ UNKNOWN: ClassVar[Type.TYPES] = ...
352
+ __name__: str
353
+ def __init__(self, *args, **kwargs) -> None: ...
354
+ def __ge__(self, other) -> bool: ...
355
+ def __gt__(self, other) -> bool: ...
356
+ def __hash__(self) -> int: ...
357
+ def __index__(self) -> Any: ...
358
+ def __int__(self) -> int: ...
359
+ def __le__(self, other) -> bool: ...
360
+ def __lt__(self, other) -> bool: ...
361
+ def __init__(self, *args, **kwargs) -> None: ...
362
+ @staticmethod
363
+ def pretty_name(primitive: lief.DEX.Type.PRIMITIVES) -> str: ...
364
+ @property
365
+ def dim(self) -> int: ...
366
+ @property
367
+ def type(self) -> lief.DEX.Type.TYPES: ...
368
+ @property
369
+ def underlying_array_type(self) -> lief.DEX.Type: ...
370
+ @property
371
+ def value(self) -> object: ...
372
+
373
+ @overload
374
+ def parse(filename: str) -> Optional[lief.DEX.File]: ...
375
+ @overload
376
+ def parse(raw: list[int], name: str = ...) -> Optional[lief.DEX.File]: ...
377
+ @overload
378
+ def parse(obj: Union[io.IOBase|os.PathLike], name: str = ...) -> Optional[lief.DEX.File]: ...
379
+ @overload
380
+ def version(file: str) -> int: ...
381
+ @overload
382
+ def version(raw: list[int]) -> int: ...