lief 0.16.5__cp311-cp311-musllinux_1_2_i686.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/__init__.pyi ADDED
@@ -0,0 +1,101 @@
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 File(lief.Object):
11
+ @property
12
+ def header(self) -> Header: ...
13
+
14
+ def __str__(self) -> str: ...
15
+
16
+ class Header(lief.Object):
17
+ @property
18
+ def magic(self) -> list[int]: ...
19
+
20
+ @property
21
+ def version(self) -> int: ...
22
+
23
+ @property
24
+ def image_begin(self) -> int: ...
25
+
26
+ @property
27
+ def image_size(self) -> int: ...
28
+
29
+ @property
30
+ def oat_checksum(self) -> int: ...
31
+
32
+ @property
33
+ def oat_file_begin(self) -> int: ...
34
+
35
+ @property
36
+ def oat_file_end(self) -> int: ...
37
+
38
+ @property
39
+ def oat_data_end(self) -> int: ...
40
+
41
+ @property
42
+ def patch_delta(self) -> int: ...
43
+
44
+ @property
45
+ def image_roots(self) -> int: ...
46
+
47
+ @property
48
+ def pointer_size(self) -> int: ...
49
+
50
+ @property
51
+ def compile_pic(self) -> bool: ...
52
+
53
+ @property
54
+ def nb_sections(self) -> int: ...
55
+
56
+ @property
57
+ def nb_methods(self) -> int: ...
58
+
59
+ @property
60
+ def boot_image_begin(self) -> int: ...
61
+
62
+ @property
63
+ def boot_image_size(self) -> int: ...
64
+
65
+ @property
66
+ def boot_oat_begin(self) -> int: ...
67
+
68
+ @property
69
+ def boot_oat_size(self) -> int: ...
70
+
71
+ @property
72
+ def storage_mode(self) -> STORAGE_MODES: ...
73
+
74
+ @property
75
+ def data_size(self) -> int: ...
76
+
77
+ def __str__(self) -> str: ...
78
+
79
+ class STORAGE_MODES(enum.Enum):
80
+ UNCOMPRESSED = 0
81
+
82
+ LZ4 = 1
83
+
84
+ LZ4HC = 2
85
+
86
+ def android_version(art_version: int) -> lief.Android.ANDROID_VERSIONS: ...
87
+
88
+ @overload
89
+ def parse(filename: str) -> Optional[File]: ...
90
+
91
+ @overload
92
+ def parse(raw: Sequence[int], name: str = '') -> Optional[File]: ...
93
+
94
+ @overload
95
+ def parse(obj: Union[io.IOBase | os.PathLike], name: str = '') -> Optional[File]: ...
96
+
97
+ @overload
98
+ def version(file: str) -> int: ...
99
+
100
+ @overload
101
+ def version(raw: Sequence[int]) -> int: ...
@@ -0,0 +1,33 @@
1
+ import enum
2
+ from typing import Iterator, Optional, Union
3
+
4
+
5
+ class ANDROID_VERSIONS(enum.Enum):
6
+ @staticmethod
7
+ def from_value(arg: int, /) -> ANDROID_VERSIONS: ...
8
+
9
+ def __eq__(self, arg, /) -> bool: ...
10
+
11
+ def __ne__(self, arg, /) -> bool: ...
12
+
13
+ def __int__(self) -> int: ...
14
+
15
+ UNKNOWN = 0
16
+
17
+ VERSION_601 = 1
18
+
19
+ VERSION_700 = 2
20
+
21
+ VERSION_710 = 3
22
+
23
+ VERSION_712 = 4
24
+
25
+ VERSION_800 = 5
26
+
27
+ VERSION_810 = 6
28
+
29
+ VERSION_900 = 7
30
+
31
+ def code_name(version: ANDROID_VERSIONS) -> str: ...
32
+
33
+ def version_string(version: ANDROID_VERSIONS) -> str: ...
lief/DEX/__init__.pyi ADDED
@@ -0,0 +1,512 @@
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 ACCESS_FLAGS(enum.Enum):
11
+ UNKNOWN = 0
12
+
13
+ PUBLIC = 1
14
+
15
+ PRIVATE = 2
16
+
17
+ PROTECTED = 4
18
+
19
+ STATIC = 8
20
+
21
+ FINAL = 16
22
+
23
+ SYNCHRONIZED = 32
24
+
25
+ VOLATILE = 64
26
+
27
+ BRIDGE = 64
28
+
29
+ TRANSIENT = 128
30
+
31
+ VARARGS = 128
32
+
33
+ NATIVE = 256
34
+
35
+ INTERFACE = 512
36
+
37
+ ABSTRACT = 1024
38
+
39
+ STRICT = 2048
40
+
41
+ SYNTHETIC = 4096
42
+
43
+ ANNOTATION = 8192
44
+
45
+ ENUM = 16384
46
+
47
+ CONSTRUCTOR = 65536
48
+
49
+ DECLARED_SYNCHRONIZED = 131072
50
+
51
+ class Class(lief.Object):
52
+ class it_methods:
53
+ def __getitem__(self, arg: int, /) -> Method: ...
54
+
55
+ def __len__(self) -> int: ...
56
+
57
+ def __iter__(self) -> Class.it_methods: ...
58
+
59
+ def __next__(self) -> Method: ...
60
+
61
+ class it_fields:
62
+ def __getitem__(self, arg: int, /) -> Field: ...
63
+
64
+ def __len__(self) -> int: ...
65
+
66
+ def __iter__(self) -> Class.it_fields: ...
67
+
68
+ def __next__(self) -> Field: ...
69
+
70
+ class it_named_methods:
71
+ def __getitem__(self, arg: int, /) -> Method: ...
72
+
73
+ def __len__(self) -> int: ...
74
+
75
+ def __iter__(self) -> Class.it_named_methods: ...
76
+
77
+ def __next__(self) -> Method: ...
78
+
79
+ class it_named_fields:
80
+ def __getitem__(self, arg: int, /) -> Field: ...
81
+
82
+ def __len__(self) -> int: ...
83
+
84
+ def __iter__(self) -> Class.it_named_fields: ...
85
+
86
+ def __next__(self) -> Field: ...
87
+
88
+ @property
89
+ def fullname(self) -> str: ...
90
+
91
+ @property
92
+ def pretty_name(self) -> str: ...
93
+
94
+ @property
95
+ def name(self) -> str: ...
96
+
97
+ @property
98
+ def source_filename(self) -> str: ...
99
+
100
+ @property
101
+ def package_name(self) -> str: ...
102
+
103
+ @property
104
+ def has_parent(self) -> bool: ...
105
+
106
+ @property
107
+ def parent(self) -> Class: ...
108
+
109
+ @property
110
+ def methods(self) -> Class.it_methods: ...
111
+
112
+ def get_method(self, name: str) -> Class.it_named_methods: ...
113
+
114
+ @property
115
+ def fields(self) -> Class.it_fields: ...
116
+
117
+ def get_field(self, name: str) -> Class.it_named_fields: ...
118
+
119
+ @property
120
+ def access_flags(self) -> list[ACCESS_FLAGS]: ...
121
+
122
+ @property
123
+ def dex2dex_info(self) -> dict[Method, dict[int, int]]: ...
124
+
125
+ @property
126
+ def index(self) -> int: ...
127
+
128
+ def has(self, flag: ACCESS_FLAGS) -> bool: ...
129
+
130
+ def __str__(self) -> str: ...
131
+
132
+ class CodeInfo(lief.Object):
133
+ def __str__(self) -> str: ...
134
+
135
+ class Field(lief.Object):
136
+ @property
137
+ def name(self) -> str: ...
138
+
139
+ @property
140
+ def index(self) -> int: ...
141
+
142
+ @property
143
+ def has_class(self) -> bool: ...
144
+
145
+ @property
146
+ def cls(self) -> Class: ...
147
+
148
+ @property
149
+ def is_static(self) -> bool: ...
150
+
151
+ @property
152
+ def type(self) -> Type: ...
153
+
154
+ @property
155
+ def access_flags(self) -> list[ACCESS_FLAGS]: ...
156
+
157
+ def has(self, flag: ACCESS_FLAGS) -> bool: ...
158
+
159
+ def __str__(self) -> str: ...
160
+
161
+ class File(lief.Object):
162
+ class it_classes:
163
+ def __getitem__(self, arg: int, /) -> Class: ...
164
+
165
+ def __len__(self) -> int: ...
166
+
167
+ def __iter__(self) -> File.it_classes: ...
168
+
169
+ def __next__(self) -> Class: ...
170
+
171
+ class it_methods:
172
+ def __getitem__(self, arg: int, /) -> Method: ...
173
+
174
+ def __len__(self) -> int: ...
175
+
176
+ def __iter__(self) -> File.it_methods: ...
177
+
178
+ def __next__(self) -> Method: ...
179
+
180
+ class it_strings:
181
+ def __getitem__(self, arg: int, /) -> str: ...
182
+
183
+ def __len__(self) -> int: ...
184
+
185
+ def __iter__(self) -> File.it_strings: ...
186
+
187
+ def __next__(self) -> str: ...
188
+
189
+ class it_types:
190
+ def __getitem__(self, arg: int, /) -> Type: ...
191
+
192
+ def __len__(self) -> int: ...
193
+
194
+ def __iter__(self) -> File.it_types: ...
195
+
196
+ def __next__(self) -> Type: ...
197
+
198
+ class it_prototypes:
199
+ def __getitem__(self, arg: int, /) -> Prototype: ...
200
+
201
+ def __len__(self) -> int: ...
202
+
203
+ def __iter__(self) -> File.it_prototypes: ...
204
+
205
+ def __next__(self) -> Prototype: ...
206
+
207
+ class it_fields:
208
+ def __getitem__(self, arg: int, /) -> Field: ...
209
+
210
+ def __len__(self) -> int: ...
211
+
212
+ def __iter__(self) -> File.it_fields: ...
213
+
214
+ def __next__(self) -> Field: ...
215
+
216
+ @property
217
+ def version(self) -> int: ...
218
+
219
+ @property
220
+ def header(self) -> Header: ...
221
+
222
+ @property
223
+ def classes(self) -> File.it_classes: ...
224
+
225
+ def has_class(self, classname: str) -> bool: ...
226
+
227
+ @overload
228
+ def get_class(self, classname: str) -> Class: ...
229
+
230
+ @overload
231
+ def get_class(self, classname: int) -> Class: ...
232
+
233
+ @property
234
+ def methods(self) -> File.it_methods: ...
235
+
236
+ @property
237
+ def fields(self) -> File.it_fields: ...
238
+
239
+ @property
240
+ def strings(self) -> File.it_strings: ...
241
+
242
+ @property
243
+ def types(self) -> File.it_types: ...
244
+
245
+ @property
246
+ def prototypes(self) -> File.it_prototypes: ...
247
+
248
+ @property
249
+ def map(self) -> MapList: ...
250
+
251
+ def raw(self, deoptimize: bool = True) -> list[int]: ...
252
+
253
+ name: str
254
+
255
+ location: str
256
+
257
+ @property
258
+ def dex2dex_json_info(self) -> str: ...
259
+
260
+ def save(self, output: str = '', deoptimize: bool = True) -> str: ...
261
+
262
+ def __str__(self) -> str: ...
263
+
264
+ class Header(lief.Object):
265
+ @property
266
+ def magic(self) -> list[int]: ...
267
+
268
+ @property
269
+ def checksum(self) -> int: ...
270
+
271
+ @property
272
+ def signature(self) -> list[int]: ...
273
+
274
+ @property
275
+ def file_size(self) -> int: ...
276
+
277
+ @property
278
+ def header_size(self) -> int: ...
279
+
280
+ @property
281
+ def endian_tag(self) -> int: ...
282
+
283
+ @property
284
+ def map_offset(self) -> int: ...
285
+
286
+ @property
287
+ def strings(self) -> tuple[int, int]: ...
288
+
289
+ @property
290
+ def link(self) -> tuple[int, int]: ...
291
+
292
+ @property
293
+ def types(self) -> tuple[int, int]: ...
294
+
295
+ @property
296
+ def prototypes(self) -> tuple[int, int]: ...
297
+
298
+ @property
299
+ def fields(self) -> tuple[int, int]: ...
300
+
301
+ @property
302
+ def methods(self) -> tuple[int, int]: ...
303
+
304
+ @property
305
+ def classes(self) -> tuple[int, int]: ...
306
+
307
+ @property
308
+ def data(self) -> tuple[int, int]: ...
309
+
310
+ @property
311
+ def nb_classes(self) -> int: ...
312
+
313
+ @property
314
+ def nb_methods(self) -> int: ...
315
+
316
+ def __str__(self) -> str: ...
317
+
318
+ class MapItem(lief.Object):
319
+ class TYPES(enum.Enum):
320
+ @staticmethod
321
+ def from_value(arg: int, /) -> MapItem.TYPES: ...
322
+
323
+ def __eq__(self, arg, /) -> bool: ...
324
+
325
+ def __ne__(self, arg, /) -> bool: ...
326
+
327
+ def __int__(self) -> int: ...
328
+
329
+ HEADER = 0
330
+
331
+ STRING_ID = 1
332
+
333
+ TYPE_ID = 2
334
+
335
+ PROTO_ID = 3
336
+
337
+ FIELD_ID = 4
338
+
339
+ METHOD_ID = 5
340
+
341
+ CLASS_DEF = 6
342
+
343
+ CALL_SITE_ID = 7
344
+
345
+ METHOD_HANDLE = 8
346
+
347
+ MAP_LIST = 4096
348
+
349
+ TYPE_LIST = 4097
350
+
351
+ ANNOTATION_SET_REF_LIST = 4098
352
+
353
+ ANNOTATION_SET = 4099
354
+
355
+ CLASS_DATA = 8192
356
+
357
+ CODE = 8193
358
+
359
+ STRING_DATA = 8194
360
+
361
+ DEBUG_INFO = 8195
362
+
363
+ ANNOTATION = 8196
364
+
365
+ ENCODED_ARRAY = 8197
366
+
367
+ ANNOTATIONS_DIRECTORY = 8198
368
+
369
+ @property
370
+ def type(self) -> MapItem.TYPES: ...
371
+
372
+ @property
373
+ def offset(self) -> int: ...
374
+
375
+ @property
376
+ def size(self) -> int: ...
377
+
378
+ def __str__(self) -> str: ...
379
+
380
+ class MapList(lief.Object):
381
+ class it_items_t:
382
+ def __getitem__(self, arg: int, /) -> MapItem: ...
383
+
384
+ def __len__(self) -> int: ...
385
+
386
+ def __iter__(self) -> MapList.it_items_t: ...
387
+
388
+ def __next__(self) -> MapItem: ...
389
+
390
+ @property
391
+ def items(self) -> MapList.it_items_t: ...
392
+
393
+ def has(self, type: MapItem.TYPES) -> bool: ...
394
+
395
+ def get(self, type: MapItem.TYPES) -> MapItem: ...
396
+
397
+ def __getitem__(self, arg: MapItem.TYPES, /) -> MapItem: ...
398
+
399
+ def __str__(self) -> str: ...
400
+
401
+ class Method(lief.Object):
402
+ @property
403
+ def name(self) -> str: ...
404
+
405
+ @property
406
+ def index(self) -> int: ...
407
+
408
+ @property
409
+ def has_class(self) -> bool: ...
410
+
411
+ @property
412
+ def cls(self) -> Class: ...
413
+
414
+ @property
415
+ def code_offset(self) -> int: ...
416
+
417
+ @property
418
+ def bytecode(self) -> list[int]: ...
419
+
420
+ @property
421
+ def is_virtual(self) -> bool: ...
422
+
423
+ @property
424
+ def prototype(self) -> Prototype: ...
425
+
426
+ @property
427
+ def access_flags(self) -> list[ACCESS_FLAGS]: ...
428
+
429
+ def has(self, flag: ACCESS_FLAGS) -> bool: ...
430
+
431
+ def insert_dex2dex_info(self, pc: int, index: int) -> None: ...
432
+
433
+ def __str__(self) -> str: ...
434
+
435
+ class Prototype(lief.Object):
436
+ class it_params:
437
+ def __getitem__(self, arg: int, /) -> Type: ...
438
+
439
+ def __len__(self) -> int: ...
440
+
441
+ def __iter__(self) -> Prototype.it_params: ...
442
+
443
+ def __next__(self) -> Type: ...
444
+
445
+ @property
446
+ def return_type(self) -> Type: ...
447
+
448
+ @property
449
+ def parameters_type(self) -> Prototype.it_params: ...
450
+
451
+ def __str__(self) -> str: ...
452
+
453
+ class Type(lief.Object):
454
+ class TYPES(enum.Enum):
455
+ UNKNOWN = 0
456
+
457
+ ARRAY = 3
458
+
459
+ PRIMITIVE = 1
460
+
461
+ CLASS = 2
462
+
463
+ class PRIMITIVES(enum.Enum):
464
+ VOID_T = 1
465
+
466
+ BOOLEAN = 2
467
+
468
+ BYTE = 3
469
+
470
+ SHORT = 4
471
+
472
+ CHAR = 5
473
+
474
+ INT = 6
475
+
476
+ LONG = 7
477
+
478
+ FLOAT = 8
479
+
480
+ DOUBLE = 9
481
+
482
+ @property
483
+ def type(self) -> Type.TYPES: ...
484
+
485
+ @property
486
+ def value(self) -> object: ...
487
+
488
+ @property
489
+ def dim(self) -> int: ...
490
+
491
+ @property
492
+ def underlying_array_type(self) -> Type: ...
493
+
494
+ @staticmethod
495
+ def pretty_name(primitive: Type.PRIMITIVES) -> str: ...
496
+
497
+ def __str__(self) -> str: ...
498
+
499
+ @overload
500
+ def parse(filename: str) -> Optional[File]: ...
501
+
502
+ @overload
503
+ def parse(raw: Sequence[int], name: str = '') -> Optional[File]: ...
504
+
505
+ @overload
506
+ def parse(obj: Union[io.IOBase | os.PathLike], name: str = '') -> Optional[File]: ...
507
+
508
+ @overload
509
+ def version(file: str) -> int: ...
510
+
511
+ @overload
512
+ def version(raw: Sequence[int]) -> int: ...