lief 0.16.6__cp312-cp312-win32.whl → 0.17.0__cp312-cp312-win32.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 +1 -1
- lief/COFF/__init__.pyi +708 -0
- lief/DEX/__init__.pyi +7 -1
- lief/ELF/__init__.pyi +473 -14
- lief/MachO/__init__.pyi +441 -23
- lief/OAT/__init__.pyi +1 -1
- lief/PE/__init__.pyi +2515 -1903
- lief/PE/unwind_aarch64/__init__.pyi +58 -0
- lief/PE/unwind_x64/__init__.pyi +53 -0
- lief/VDEX/__init__.pyi +1 -1
- lief/__init__.py +1 -1
- lief/__init__.pyi +40 -14
- lief/_lief.pyd +0 -0
- lief/assembly/__init__.pyi +17 -0
- lief/assembly/aarch64/__init__.pyi +10989 -8863
- lief/assembly/arm/__init__.pyi +4516 -4486
- lief/assembly/ebpf/__init__.pyi +530 -476
- lief/assembly/mips/__init__.pyi +2921 -2883
- lief/assembly/powerpc/__init__.pyi +2953 -2841
- lief/assembly/riscv/__init__.pyi +14783 -13821
- lief/assembly/x86/__init__.pyi +24948 -19904
- lief/dsc/__init__.pyi +7 -3
- lief/dwarf/__init__.pyi +15 -2
- lief/dwarf/editor/__init__.pyi +138 -0
- lief/pdb/__init__.pyi +235 -1
- {lief-0.16.6.dist-info → lief-0.17.0.dist-info}/METADATA +1 -1
- lief-0.17.0.dist-info/RECORD +37 -0
- lief-0.16.6.dist-info/RECORD +0 -33
- {lief-0.16.6.dist-info → lief-0.17.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
from typing import Iterator, Optional, Union
|
|
2
|
+
|
|
3
|
+
import lief.PE
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class UnpackedFunction(lief.PE.RuntimeFunctionAArch64):
|
|
7
|
+
class epilog_scope_t:
|
|
8
|
+
start_offset: int
|
|
9
|
+
|
|
10
|
+
start_index: int
|
|
11
|
+
|
|
12
|
+
reserved: int
|
|
13
|
+
|
|
14
|
+
class it_epilog_scopes:
|
|
15
|
+
def __getitem__(self, arg: int, /) -> UnpackedFunction.epilog_scope_t: ...
|
|
16
|
+
|
|
17
|
+
def __len__(self) -> int: ...
|
|
18
|
+
|
|
19
|
+
def __iter__(self) -> UnpackedFunction.it_epilog_scopes: ...
|
|
20
|
+
|
|
21
|
+
def __next__(self) -> UnpackedFunction.epilog_scope_t: ...
|
|
22
|
+
|
|
23
|
+
xdata_rva: int
|
|
24
|
+
|
|
25
|
+
version: int
|
|
26
|
+
|
|
27
|
+
X: int
|
|
28
|
+
|
|
29
|
+
E: int
|
|
30
|
+
|
|
31
|
+
@property
|
|
32
|
+
def epilog_count(self) -> int: ...
|
|
33
|
+
|
|
34
|
+
@property
|
|
35
|
+
def epilog_offset(self) -> int: ...
|
|
36
|
+
|
|
37
|
+
code_words: int
|
|
38
|
+
|
|
39
|
+
exception_handler: int
|
|
40
|
+
|
|
41
|
+
unwind_code: memoryview
|
|
42
|
+
|
|
43
|
+
@property
|
|
44
|
+
def epilog_scopes(self) -> UnpackedFunction.it_epilog_scopes: ...
|
|
45
|
+
|
|
46
|
+
@property
|
|
47
|
+
def is_extended(self) -> bool: ...
|
|
48
|
+
|
|
49
|
+
class PackedFunction(lief.PE.RuntimeFunctionAArch64):
|
|
50
|
+
frame_size: int
|
|
51
|
+
|
|
52
|
+
reg_I: int
|
|
53
|
+
|
|
54
|
+
reg_F: int
|
|
55
|
+
|
|
56
|
+
H: int
|
|
57
|
+
|
|
58
|
+
CR: int
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
from typing import Iterator, Optional, Union
|
|
2
|
+
|
|
3
|
+
import lief.PE
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Code:
|
|
7
|
+
@property
|
|
8
|
+
def opcode(self) -> lief.PE.RuntimeFunctionX64.UNWIND_OPCODES: ...
|
|
9
|
+
|
|
10
|
+
@property
|
|
11
|
+
def position(self) -> int: ...
|
|
12
|
+
|
|
13
|
+
def __str__(self) -> str: ...
|
|
14
|
+
|
|
15
|
+
class Alloc(Code):
|
|
16
|
+
@property
|
|
17
|
+
def size(self) -> int: ...
|
|
18
|
+
|
|
19
|
+
class PushNonVol(Code):
|
|
20
|
+
@property
|
|
21
|
+
def reg(self) -> lief.PE.RuntimeFunctionX64.UNWIND_REG: ...
|
|
22
|
+
|
|
23
|
+
class PushMachFrame(Code):
|
|
24
|
+
@property
|
|
25
|
+
def value(self) -> int: ...
|
|
26
|
+
|
|
27
|
+
class SetFPReg(Code):
|
|
28
|
+
@property
|
|
29
|
+
def reg(self) -> lief.PE.RuntimeFunctionX64.UNWIND_REG: ...
|
|
30
|
+
|
|
31
|
+
class SaveNonVolatile(Code):
|
|
32
|
+
@property
|
|
33
|
+
def reg(self) -> lief.PE.RuntimeFunctionX64.UNWIND_REG: ...
|
|
34
|
+
|
|
35
|
+
@property
|
|
36
|
+
def offset(self) -> int: ...
|
|
37
|
+
|
|
38
|
+
class SaveXMM128(Code):
|
|
39
|
+
@property
|
|
40
|
+
def num(self) -> int: ...
|
|
41
|
+
|
|
42
|
+
@property
|
|
43
|
+
def offset(self) -> int: ...
|
|
44
|
+
|
|
45
|
+
class Epilog(Code):
|
|
46
|
+
@property
|
|
47
|
+
def flags(self) -> int: ...
|
|
48
|
+
|
|
49
|
+
@property
|
|
50
|
+
def size(self) -> int: ...
|
|
51
|
+
|
|
52
|
+
class Spare(Code):
|
|
53
|
+
pass
|
lief/VDEX/__init__.pyi
CHANGED
|
@@ -12,7 +12,7 @@ import lief.OAT
|
|
|
12
12
|
def parse(filename: str) -> Optional[File]: ...
|
|
13
13
|
|
|
14
14
|
@overload
|
|
15
|
-
def parse(obj: Union[io.IOBase | os.PathLike], name: str = '') -> Optional[File]: ...
|
|
15
|
+
def parse(obj: Union[str | io.IOBase | os.PathLike | bytes | list[int]], name: str = '') -> Optional[File]: ...
|
|
16
16
|
|
|
17
17
|
class File(lief.Object):
|
|
18
18
|
@property
|
lief/__init__.py
CHANGED
|
@@ -7,7 +7,7 @@ if len(__path__) > 0 and __path__[0] not in sys.path:
|
|
|
7
7
|
from ._lief import __version__, __tag__, __commit__, __is_tagged__, __extended__
|
|
8
8
|
|
|
9
9
|
if __extended__:
|
|
10
|
-
from .
|
|
10
|
+
from ._lief_extended import __LIEF_MAIN_COMMIT__, __LIEF_EXTENDED_VERSION_STR__, __extended_version__
|
|
11
11
|
|
|
12
12
|
# cf. https://github.com/pytorch/pytorch/blob/60a3b7425dde97fe8b46183c154a9c3b24f0c733/torch/__init__.py#L467-L470
|
|
13
13
|
for attr in dir(_lief):
|
lief/__init__.pyi
CHANGED
|
@@ -11,6 +11,7 @@ from typing import Iterator, Optional, Union, overload
|
|
|
11
11
|
from . import (
|
|
12
12
|
ART as ART,
|
|
13
13
|
Android as Android,
|
|
14
|
+
COFF as COFF,
|
|
14
15
|
DEX as DEX,
|
|
15
16
|
ELF as ELF,
|
|
16
17
|
MachO as MachO,
|
|
@@ -32,10 +33,29 @@ __commit__: str = ...
|
|
|
32
33
|
|
|
33
34
|
__is_tagged__: bool = ...
|
|
34
35
|
|
|
36
|
+
class lief_version_t:
|
|
37
|
+
major: int
|
|
38
|
+
|
|
39
|
+
minor: int
|
|
40
|
+
|
|
41
|
+
patch: int
|
|
42
|
+
|
|
43
|
+
id: int
|
|
44
|
+
|
|
45
|
+
def __repr__(self) -> str: ...
|
|
46
|
+
|
|
47
|
+
def __str__(self) -> str: ...
|
|
48
|
+
|
|
35
49
|
def disable_leak_warning() -> None: ...
|
|
36
50
|
|
|
37
51
|
def demangle(mangled: str) -> Optional[str]: ...
|
|
38
52
|
|
|
53
|
+
def dump(buffer: memoryview, title: str = '', prefix: str = '', limit: int = 0) -> str: ...
|
|
54
|
+
|
|
55
|
+
def extended_version_info() -> str: ...
|
|
56
|
+
|
|
57
|
+
def extended_version() -> lief_version_t: ...
|
|
58
|
+
|
|
39
59
|
__extended__: bool = ...
|
|
40
60
|
|
|
41
61
|
class range_t:
|
|
@@ -270,10 +290,10 @@ class Binary(Object):
|
|
|
270
290
|
class VA_TYPES(enum.Enum):
|
|
271
291
|
AUTO = 0
|
|
272
292
|
|
|
273
|
-
VA = 2
|
|
274
|
-
|
|
275
293
|
RVA = 1
|
|
276
294
|
|
|
295
|
+
VA = 2
|
|
296
|
+
|
|
277
297
|
class FORMATS(enum.Enum):
|
|
278
298
|
UNKNOWN = 0
|
|
279
299
|
|
|
@@ -396,7 +416,12 @@ class Binary(Object):
|
|
|
396
416
|
|
|
397
417
|
def disassemble_from_bytes(self, buffer: bytes, address: int = 0) -> Iterator[Optional[assembly.Instruction]]: ...
|
|
398
418
|
|
|
399
|
-
def assemble(self, address: int, assembly: str) -> bytes: ...
|
|
419
|
+
def assemble(self, address: int, assembly: str, config: assembly.AssemblerConfig = ...) -> bytes: ...
|
|
420
|
+
|
|
421
|
+
@property
|
|
422
|
+
def page_size(self) -> int: ...
|
|
423
|
+
|
|
424
|
+
def load_debug_info(self, path: Union[str | os.PathLike]) -> DebugInfo: ...
|
|
400
425
|
|
|
401
426
|
def __str__(self) -> str: ...
|
|
402
427
|
|
|
@@ -443,14 +468,7 @@ class Symbol(Object):
|
|
|
443
468
|
|
|
444
469
|
def __str__(self) -> str: ...
|
|
445
470
|
|
|
446
|
-
|
|
447
|
-
def parse(raw: bytes) -> Optional[Binary]: ...
|
|
448
|
-
|
|
449
|
-
@overload
|
|
450
|
-
def parse(filepath: str) -> Optional[Binary]: ...
|
|
451
|
-
|
|
452
|
-
@overload
|
|
453
|
-
def parse(obj: Union[io.IOBase | os.PathLike]) -> Optional[Binary]: ...
|
|
471
|
+
def parse(obj: Union[str | io.IOBase | os.PathLike | bytes | list[int]]) -> PE.Binary | OAT.Binary | ELF.Binary | MachO.Binary | COFF.Binary | None: ...
|
|
454
472
|
|
|
455
473
|
class Relocation(Object):
|
|
456
474
|
address: int
|
|
@@ -528,20 +546,26 @@ class DebugInfo:
|
|
|
528
546
|
@property
|
|
529
547
|
def format(self) -> DebugInfo.FORMAT: ...
|
|
530
548
|
|
|
549
|
+
def find_function_address(self, name: str) -> int | None: ...
|
|
550
|
+
|
|
551
|
+
def is_pdb(file: Union[str | os.PathLike]) -> bool: ...
|
|
552
|
+
|
|
553
|
+
def is_shared_cache(file: Union[str | os.PathLike]) -> bool: ...
|
|
554
|
+
|
|
531
555
|
@overload
|
|
532
|
-
def is_elf(filename: str) -> bool: ...
|
|
556
|
+
def is_elf(filename: Union[str | os.PathLike]) -> bool: ...
|
|
533
557
|
|
|
534
558
|
@overload
|
|
535
559
|
def is_elf(raw: Sequence[int]) -> bool: ...
|
|
536
560
|
|
|
537
561
|
@overload
|
|
538
|
-
def is_pe(file: str) -> bool: ...
|
|
562
|
+
def is_pe(file: Union[str | os.PathLike]) -> bool: ...
|
|
539
563
|
|
|
540
564
|
@overload
|
|
541
565
|
def is_pe(raw: Sequence[int]) -> bool: ...
|
|
542
566
|
|
|
543
567
|
@overload
|
|
544
|
-
def is_macho(filename: str) -> bool: ...
|
|
568
|
+
def is_macho(filename: Union[str | os.PathLike]) -> bool: ...
|
|
545
569
|
|
|
546
570
|
@overload
|
|
547
571
|
def is_macho(raw: Sequence[int]) -> bool: ...
|
|
@@ -572,3 +596,5 @@ def is_art(path: str) -> bool: ...
|
|
|
572
596
|
|
|
573
597
|
@overload
|
|
574
598
|
def is_art(raw: Sequence[int]) -> bool: ...
|
|
599
|
+
|
|
600
|
+
def is_coff(file: Union[str | os.PathLike]) -> bool: ...
|
lief/_lief.pyd
CHANGED
|
Binary file
|
lief/assembly/__init__.pyi
CHANGED
|
@@ -102,3 +102,20 @@ class Instruction:
|
|
|
102
102
|
def branch_target(self) -> Union[int, lief.lief_errors]: ...
|
|
103
103
|
|
|
104
104
|
def __str__(self) -> str: ...
|
|
105
|
+
|
|
106
|
+
class AssemblerConfig:
|
|
107
|
+
def __init__(self) -> None: ...
|
|
108
|
+
|
|
109
|
+
class DIALECT(enum.Enum):
|
|
110
|
+
DEFAULT_DIALECT = 0
|
|
111
|
+
|
|
112
|
+
X86_INTEL = 1
|
|
113
|
+
|
|
114
|
+
X86_ATT = 2
|
|
115
|
+
|
|
116
|
+
@staticmethod
|
|
117
|
+
def default_config() -> AssemblerConfig: ...
|
|
118
|
+
|
|
119
|
+
dialect: AssemblerConfig.DIALECT
|
|
120
|
+
|
|
121
|
+
def resolve_symbol(self, name: str) -> int | None: ...
|