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