lief 0.16.5__cp312-cp312-win_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.

@@ -0,0 +1,2678 @@
1
+ from collections.abc import Sequence
2
+ import enum
3
+ import io
4
+ import lief.MachO
5
+ import os
6
+ from typing import Iterator, Optional, Union, overload
7
+
8
+ import lief
9
+
10
+
11
+ class ARM64_RELOCATION(enum.Enum):
12
+ @staticmethod
13
+ def from_value(arg: int, /) -> ARM64_RELOCATION: ...
14
+
15
+ def __eq__(self, arg, /) -> bool: ...
16
+
17
+ def __ne__(self, arg, /) -> bool: ...
18
+
19
+ def __int__(self) -> int: ...
20
+
21
+ UNSIGNED = 0
22
+
23
+ SUBTRACTOR = 1
24
+
25
+ BRANCH26 = 2
26
+
27
+ PAGE21 = 3
28
+
29
+ PAGEOFF12 = 4
30
+
31
+ GOT_LOAD_PAGE21 = 5
32
+
33
+ GOT_LOAD_PAGEOFF12 = 6
34
+
35
+ POINTER_TO_GOT = 7
36
+
37
+ TLVP_LOAD_PAGE21 = 8
38
+
39
+ TLVP_LOAD_PAGEOFF12 = 9
40
+
41
+ ADDEND = 10
42
+
43
+ class ARM_RELOCATION(enum.Enum):
44
+ @staticmethod
45
+ def from_value(arg: int, /) -> ARM_RELOCATION: ...
46
+
47
+ def __eq__(self, arg, /) -> bool: ...
48
+
49
+ def __ne__(self, arg, /) -> bool: ...
50
+
51
+ def __int__(self) -> int: ...
52
+
53
+ VANILLA = 0
54
+
55
+ PAIR = 1
56
+
57
+ SECTDIFF = 2
58
+
59
+ LOCAL_SECTDIFF = 3
60
+
61
+ PB_LA_PTR = 4
62
+
63
+ BR24 = 5
64
+
65
+ THUMB_RELOC_BR22 = 6
66
+
67
+ THUMB_32BIT_BRANCH = 7
68
+
69
+ HALF = 8
70
+
71
+ HALF_SECTDIFF = 9
72
+
73
+ class Binary(lief.Binary):
74
+ class it_commands:
75
+ def __getitem__(self, arg: int, /) -> LoadCommand: ...
76
+
77
+ def __len__(self) -> int: ...
78
+
79
+ def __iter__(self) -> Binary.it_commands: ...
80
+
81
+ def __next__(self) -> LoadCommand: ...
82
+
83
+ class it_symbols:
84
+ def __getitem__(self, arg: int, /) -> Symbol: ...
85
+
86
+ def __len__(self) -> int: ...
87
+
88
+ def __iter__(self) -> Binary.it_symbols: ...
89
+
90
+ def __next__(self) -> Symbol: ...
91
+
92
+ class it_filter_symbols:
93
+ def __getitem__(self, arg: int, /) -> Symbol: ...
94
+
95
+ def __len__(self) -> int: ...
96
+
97
+ def __iter__(self) -> Binary.it_filter_symbols: ...
98
+
99
+ def __next__(self) -> Symbol: ...
100
+
101
+ class it_sections:
102
+ def __getitem__(self, arg: int, /) -> Section: ...
103
+
104
+ def __len__(self) -> int: ...
105
+
106
+ def __iter__(self) -> Binary.it_sections: ...
107
+
108
+ def __next__(self) -> Section: ...
109
+
110
+ class it_segments:
111
+ def __getitem__(self, arg: int, /) -> SegmentCommand: ...
112
+
113
+ def __len__(self) -> int: ...
114
+
115
+ def __iter__(self) -> Binary.it_segments: ...
116
+
117
+ def __next__(self) -> SegmentCommand: ...
118
+
119
+ class it_libraries:
120
+ def __getitem__(self, arg: int, /) -> DylibCommand: ...
121
+
122
+ def __len__(self) -> int: ...
123
+
124
+ def __iter__(self) -> Binary.it_libraries: ...
125
+
126
+ def __next__(self) -> DylibCommand: ...
127
+
128
+ class it_relocations:
129
+ def __getitem__(self, arg: int, /) -> Relocation: ...
130
+
131
+ def __len__(self) -> int: ...
132
+
133
+ def __iter__(self) -> Binary.it_relocations: ...
134
+
135
+ def __next__(self) -> Relocation: ...
136
+
137
+ class it_rpaths:
138
+ def __getitem__(self, arg: int, /) -> RPathCommand: ...
139
+
140
+ def __len__(self) -> int: ...
141
+
142
+ def __iter__(self) -> Binary.it_rpaths: ...
143
+
144
+ def __next__(self) -> RPathCommand: ...
145
+
146
+ class it_sub_clients:
147
+ def __getitem__(self, arg: int, /) -> SubClient: ...
148
+
149
+ def __len__(self) -> int: ...
150
+
151
+ def __iter__(self) -> Binary.it_sub_clients: ...
152
+
153
+ def __next__(self) -> SubClient: ...
154
+
155
+ class range_t:
156
+ start: int
157
+
158
+ end: int
159
+
160
+ @property
161
+ def header(self) -> Header: ... # type: ignore
162
+
163
+ @property
164
+ def sections(self) -> Binary.it_sections: ... # type: ignore
165
+
166
+ @property
167
+ def relocations(self) -> Binary.it_relocations: ... # type: ignore
168
+
169
+ @property
170
+ def segments(self) -> Binary.it_segments: ...
171
+
172
+ @property
173
+ def libraries(self) -> Binary.it_libraries: ... # type: ignore
174
+
175
+ @property
176
+ def symbols(self) -> Binary.it_symbols: ... # type: ignore
177
+
178
+ def has_symbol(self, name: str) -> bool: ...
179
+
180
+ def get_symbol(self, name: str) -> Symbol: ...
181
+
182
+ @property
183
+ def imported_symbols(self) -> Binary.it_filter_symbols: ...
184
+
185
+ @property
186
+ def exported_symbols(self) -> Binary.it_filter_symbols: ...
187
+
188
+ @property
189
+ def commands(self) -> Binary.it_commands: ...
190
+
191
+ @property
192
+ def filesets(self) -> FatBinary.it_binaries: ...
193
+
194
+ @property
195
+ def has_filesets(self) -> bool: ...
196
+
197
+ @property
198
+ def fileset_name(self) -> str: ...
199
+
200
+ @property
201
+ def imagebase(self) -> int: ...
202
+
203
+ @property
204
+ def virtual_size(self) -> int: ...
205
+
206
+ @property
207
+ def fat_offset(self) -> int: ...
208
+
209
+ def section_from_offset(self, arg: int, /) -> Section: ...
210
+
211
+ def section_from_virtual_address(self, arg: int, /) -> Section: ...
212
+
213
+ def segment_from_offset(self, arg: int, /) -> SegmentCommand: ...
214
+
215
+ def segment_from_virtual_address(self, arg: int, /) -> SegmentCommand: ...
216
+
217
+ @property
218
+ def has_entrypoint(self) -> bool: ...
219
+
220
+ @property
221
+ def has_uuid(self) -> bool: ...
222
+
223
+ @property
224
+ def uuid(self) -> UUIDCommand: ...
225
+
226
+ @property
227
+ def has_main_command(self) -> bool: ...
228
+
229
+ @property
230
+ def main_command(self) -> MainCommand: ...
231
+
232
+ @property
233
+ def has_dylinker(self) -> bool: ...
234
+
235
+ @property
236
+ def dylinker(self) -> DylinkerCommand: ...
237
+
238
+ @property
239
+ def has_dyld_info(self) -> bool: ...
240
+
241
+ @property
242
+ def dyld_info(self) -> DyldInfo: ...
243
+
244
+ @property
245
+ def has_function_starts(self) -> bool: ...
246
+
247
+ @property
248
+ def function_starts(self) -> FunctionStarts: ...
249
+
250
+ @property
251
+ def has_source_version(self) -> bool: ...
252
+
253
+ @property
254
+ def source_version(self) -> SourceVersion: ...
255
+
256
+ @property
257
+ def has_version_min(self) -> bool: ...
258
+
259
+ @property
260
+ def version_min(self) -> VersionMin: ...
261
+
262
+ @property
263
+ def has_routine_command(self) -> bool: ...
264
+
265
+ @property
266
+ def routine_command(self) -> Routine: ...
267
+
268
+ @property
269
+ def has_thread_command(self) -> bool: ...
270
+
271
+ @property
272
+ def thread_command(self) -> ThreadCommand: ...
273
+
274
+ @property
275
+ def has_rpath(self) -> bool: ...
276
+
277
+ @property
278
+ def rpath(self) -> RPathCommand: ...
279
+
280
+ @property
281
+ def rpaths(self) -> Binary.it_rpaths: ...
282
+
283
+ @property
284
+ def has_symbol_command(self) -> bool: ...
285
+
286
+ @property
287
+ def symbol_command(self) -> SymbolCommand: ...
288
+
289
+ @property
290
+ def has_dynamic_symbol_command(self) -> bool: ...
291
+
292
+ @property
293
+ def dynamic_symbol_command(self) -> DynamicSymbolCommand: ...
294
+
295
+ @property
296
+ def has_code_signature(self) -> bool: ...
297
+
298
+ @property
299
+ def code_signature(self) -> CodeSignature: ...
300
+
301
+ @property
302
+ def has_code_signature_dir(self) -> bool: ...
303
+
304
+ @property
305
+ def code_signature_dir(self) -> CodeSignatureDir: ...
306
+
307
+ @property
308
+ def has_data_in_code(self) -> bool: ...
309
+
310
+ @property
311
+ def data_in_code(self) -> DataInCode: ...
312
+
313
+ @property
314
+ def has_segment_split_info(self) -> bool: ...
315
+
316
+ @property
317
+ def segment_split_info(self) -> SegmentSplitInfo: ...
318
+
319
+ @property
320
+ def subclients(self) -> Binary.it_sub_clients: ...
321
+
322
+ @property
323
+ def has_subclients(self) -> bool: ...
324
+
325
+ @property
326
+ def has_sub_framework(self) -> bool: ...
327
+
328
+ @property
329
+ def sub_framework(self) -> SubFramework: ...
330
+
331
+ @property
332
+ def has_dyld_environment(self) -> bool: ...
333
+
334
+ @property
335
+ def dyld_environment(self) -> DyldEnvironment: ...
336
+
337
+ @property
338
+ def has_encryption_info(self) -> bool: ...
339
+
340
+ @property
341
+ def encryption_info(self) -> EncryptionInfo: ...
342
+
343
+ @property
344
+ def has_build_version(self) -> bool: ...
345
+
346
+ @property
347
+ def platform(self) -> BuildVersion.PLATFORMS: ...
348
+
349
+ @property
350
+ def is_ios(self) -> bool: ...
351
+
352
+ @property
353
+ def is_macos(self) -> bool: ...
354
+
355
+ @property
356
+ def build_version(self) -> BuildVersion: ...
357
+
358
+ @property
359
+ def has_dyld_chained_fixups(self) -> bool: ...
360
+
361
+ @property
362
+ def dyld_chained_fixups(self) -> DyldChainedFixups: ...
363
+
364
+ @property
365
+ def has_dyld_exports_trie(self) -> bool: ...
366
+
367
+ @property
368
+ def dyld_exports_trie(self) -> DyldExportsTrie: ...
369
+
370
+ @property
371
+ def has_two_level_hints(self) -> bool: ...
372
+
373
+ @property
374
+ def two_level_hints(self) -> TwoLevelHints: ...
375
+
376
+ @property
377
+ def has_linker_opt_hint(self) -> bool: ...
378
+
379
+ @property
380
+ def linker_opt_hint(self) -> LinkerOptHint: ...
381
+
382
+ def virtual_address_to_offset(self, virtual_address: int) -> Union[int, lief.lief_errors]: ...
383
+
384
+ def has_section(self, name: str) -> bool: ...
385
+
386
+ @overload
387
+ def get_section(self, name: str) -> Section: ...
388
+
389
+ @overload
390
+ def get_section(self, segname: str, secname: str) -> Section: ...
391
+
392
+ def has_segment(self, name: str) -> bool: ...
393
+
394
+ def get_segment(self, name: str) -> SegmentCommand: ...
395
+
396
+ @property
397
+ def va_ranges(self) -> Binary.range_t: ...
398
+
399
+ @property
400
+ def off_ranges(self) -> Binary.range_t: ...
401
+
402
+ def is_valid_addr(self, address: int) -> bool: ...
403
+
404
+ @overload
405
+ def write(self, output: str) -> None: ...
406
+
407
+ @overload
408
+ def write(self, output: str, config: Builder.config_t) -> None: ...
409
+
410
+ @overload
411
+ def add(self, dylib_command: DylibCommand) -> LoadCommand: ...
412
+
413
+ @overload
414
+ def add(self, segment: SegmentCommand) -> LoadCommand: ...
415
+
416
+ @overload
417
+ def add(self, load_command: LoadCommand) -> LoadCommand: ...
418
+
419
+ @overload
420
+ def add(self, load_command: LoadCommand, index: int) -> LoadCommand: ...
421
+
422
+ @overload
423
+ def remove(self, load_command: LoadCommand) -> bool: ...
424
+
425
+ @overload
426
+ def remove(self, type: LoadCommand.TYPE) -> bool: ...
427
+
428
+ @overload
429
+ def remove(self, symbol: Symbol) -> bool: ...
430
+
431
+ def remove_command(self, index: int) -> bool: ...
432
+
433
+ @overload
434
+ def remove_section(self, name: str, clear: bool = False) -> None: ...
435
+
436
+ @overload
437
+ def remove_section(self, segname: str, secname: str, clear: bool = False) -> None: ...
438
+
439
+ def remove_signature(self) -> bool: ...
440
+
441
+ def remove_symbol(self, name: str) -> bool: ...
442
+
443
+ def can_remove(self, symbol: Symbol) -> bool: ...
444
+
445
+ def can_remove_symbol(self, symbol_name: str) -> bool: ...
446
+
447
+ @overload
448
+ def unexport(self, name: str) -> bool: ...
449
+
450
+ @overload
451
+ def unexport(self, symbol: Symbol) -> bool: ...
452
+
453
+ def extend(self, load_command: LoadCommand, size: int) -> bool: ...
454
+
455
+ def extend_segment(self, segment_command: SegmentCommand, size: int) -> bool: ...
456
+
457
+ @overload
458
+ def add_section(self, segment: SegmentCommand, section: Section) -> Section: ...
459
+
460
+ @overload
461
+ def add_section(self, section: Section) -> Section: ...
462
+
463
+ def add_library(self, library_name: str) -> LoadCommand: ...
464
+
465
+ def get(self, type: LoadCommand.TYPE) -> LoadCommand: ...
466
+
467
+ def has(self, type: LoadCommand.TYPE) -> bool: ...
468
+
469
+ @property
470
+ def unwind_functions(self) -> list[lief.Function]: ...
471
+
472
+ @property
473
+ def functions(self) -> list[lief.Function]: ...
474
+
475
+ def shift(self, value: int) -> Union[lief.ok_t, lief.lief_errors]: ...
476
+
477
+ def shift_linkedit(self, value: int) -> Union[lief.ok_t, lief.lief_errors]: ...
478
+
479
+ def add_exported_function(self, address: int, name: str) -> ExportInfo: ...
480
+
481
+ def add_local_symbol(self, address: int, name: str) -> Symbol: ...
482
+
483
+ @property
484
+ def page_size(self) -> int: ...
485
+
486
+ @property
487
+ def bindings(self) -> Iterator[BindingInfo]: ...
488
+
489
+ @property
490
+ def symbol_stubs(self) -> Sequence[Stub]: ...
491
+
492
+ @property
493
+ def has_nx_heap(self) -> bool: ...
494
+
495
+ @property
496
+ def has_nx_stack(self) -> bool: ...
497
+
498
+ @property
499
+ def support_arm64_ptr_auth(self) -> bool: ...
500
+
501
+ @property
502
+ def objc_metadata(self) -> Optional[lief.objc.Metadata]: ...
503
+
504
+ def __getitem__(self, arg: LoadCommand.TYPE, /) -> LoadCommand: ...
505
+
506
+ def __contains__(self, arg: LoadCommand.TYPE, /) -> bool: ...
507
+
508
+ @property
509
+ def overlay(self) -> memoryview: ...
510
+
511
+ def __str__(self) -> str: ...
512
+
513
+ class BindingInfo(lief.Object):
514
+ address: int
515
+
516
+ library_ordinal: int
517
+
518
+ addend: int
519
+
520
+ weak_import: bool
521
+
522
+ @property
523
+ def has_library(self) -> bool: ...
524
+
525
+ @property
526
+ def library(self) -> DylibCommand: ...
527
+
528
+ @property
529
+ def has_segment(self) -> bool: ...
530
+
531
+ @property
532
+ def segment(self) -> SegmentCommand: ...
533
+
534
+ @property
535
+ def has_symbol(self) -> bool: ...
536
+
537
+ @property
538
+ def symbol(self) -> Symbol: ...
539
+
540
+ def __str__(self) -> str: ...
541
+
542
+ class BuildToolVersion(lief.Object):
543
+ @property
544
+ def tool(self) -> BuildToolVersion.TOOLS: ...
545
+
546
+ @property
547
+ def version(self) -> list[int]: ...
548
+
549
+ def __str__(self) -> str: ...
550
+
551
+ class TOOLS(enum.Enum):
552
+ @staticmethod
553
+ def from_value(arg: int, /) -> BuildToolVersion.TOOLS: ...
554
+
555
+ def __eq__(self, arg, /) -> bool: ...
556
+
557
+ def __ne__(self, arg, /) -> bool: ...
558
+
559
+ def __int__(self) -> int: ...
560
+
561
+ UNKNOWN = 0
562
+
563
+ CLANG = 1
564
+
565
+ SWIFT = 2
566
+
567
+ LD = 3
568
+
569
+ LLD = 4
570
+
571
+ class BuildVersion(LoadCommand):
572
+ class PLATFORMS(enum.Enum):
573
+ @staticmethod
574
+ def from_value(arg: int, /) -> BuildVersion.PLATFORMS: ...
575
+
576
+ def __eq__(self, arg, /) -> bool: ...
577
+
578
+ def __ne__(self, arg, /) -> bool: ...
579
+
580
+ def __int__(self) -> int: ...
581
+
582
+ UNKNOWN = 0
583
+
584
+ MACOS = 1
585
+
586
+ IOS = 2
587
+
588
+ TVOS = 3
589
+
590
+ WATCHOS = 4
591
+
592
+ BRIDGEOS = 5
593
+
594
+ MAC_CATALYST = 6
595
+
596
+ IOS_SIMULATOR = 7
597
+
598
+ TVOS_SIMULATOR = 8
599
+
600
+ WATCHOS_SIMULATOR = 9
601
+
602
+ DRIVERKIT = 10
603
+
604
+ VISIONOS = 11
605
+
606
+ VISIONOS_SIMULATOR = 12
607
+
608
+ FIRMWARE = 13
609
+
610
+ SEPOS = 14
611
+
612
+ ANY = 4294967295
613
+
614
+ platform: lief.MachO.BuildVersion.PLATFORMS
615
+
616
+ minos: list[int]
617
+
618
+ sdk: list[int]
619
+
620
+ @property
621
+ def tools(self) -> list[BuildToolVersion]: ...
622
+
623
+ def __str__(self) -> str: ...
624
+
625
+ class Builder:
626
+ class config_t:
627
+ def __init__(self) -> None: ...
628
+
629
+ linkedit: bool
630
+
631
+ @overload
632
+ @staticmethod
633
+ def write(binary: Binary, output: str) -> Union[lief.ok_t, lief.lief_errors]: ...
634
+
635
+ @overload
636
+ @staticmethod
637
+ def write(binary: Binary, output: str, config: Builder.config_t) -> Union[lief.ok_t, lief.lief_errors]: ...
638
+
639
+ @overload
640
+ @staticmethod
641
+ def write(fat_binary: FatBinary, output: str) -> Union[lief.ok_t, lief.lief_errors]: ...
642
+
643
+ @overload
644
+ @staticmethod
645
+ def write(fat_binary: FatBinary, output: str, config: Builder.config_t) -> Union[lief.ok_t, lief.lief_errors]: ...
646
+
647
+ class ChainedBindingInfo(BindingInfo):
648
+ @property
649
+ def format(self) -> DYLD_CHAINED_FORMAT: ...
650
+
651
+ @property
652
+ def ptr_format(self) -> DYLD_CHAINED_PTR_FORMAT: ...
653
+
654
+ offset: int
655
+
656
+ @property
657
+ def sign_extended_addend(self) -> int: ...
658
+
659
+ def __str__(self) -> str: ...
660
+
661
+ class ChainedPointerAnalysis:
662
+ class dyld_chained_ptr_arm64e_rebase_t:
663
+ @property
664
+ def unpack_target(self) -> int: ...
665
+
666
+ @property
667
+ def target(self) -> int: ...
668
+
669
+ @property
670
+ def high8(self) -> int: ...
671
+
672
+ @property
673
+ def next(self) -> int: ...
674
+
675
+ @property
676
+ def bind(self) -> bool: ...
677
+
678
+ @property
679
+ def auth(self) -> bool: ...
680
+
681
+ def __str__(self) -> str: ...
682
+
683
+ class dyld_chained_ptr_arm64e_bind_t:
684
+ @property
685
+ def ordinal(self) -> int: ...
686
+
687
+ @property
688
+ def zero(self) -> int: ...
689
+
690
+ @property
691
+ def addend(self) -> int: ...
692
+
693
+ @property
694
+ def next(self) -> int: ...
695
+
696
+ @property
697
+ def bind(self) -> bool: ...
698
+
699
+ @property
700
+ def auth(self) -> bool: ...
701
+
702
+ def __str__(self) -> str: ...
703
+
704
+ class dyld_chained_ptr_arm64e_auth_rebase_t:
705
+ @property
706
+ def target(self) -> int: ...
707
+
708
+ @property
709
+ def diversity(self) -> int: ...
710
+
711
+ @property
712
+ def addr_div(self) -> int: ...
713
+
714
+ @property
715
+ def key(self) -> int: ...
716
+
717
+ @property
718
+ def next(self) -> int: ...
719
+
720
+ @property
721
+ def bind(self) -> bool: ...
722
+
723
+ @property
724
+ def auth(self) -> int: ...
725
+
726
+ def __str__(self) -> str: ...
727
+
728
+ class dyld_chained_ptr_arm64e_auth_bind_t:
729
+ @property
730
+ def ordinal(self) -> int: ...
731
+
732
+ @property
733
+ def zero(self) -> int: ...
734
+
735
+ @property
736
+ def diversity(self) -> int: ...
737
+
738
+ @property
739
+ def addr_div(self) -> int: ...
740
+
741
+ @property
742
+ def key(self) -> int: ...
743
+
744
+ @property
745
+ def next(self) -> int: ...
746
+
747
+ @property
748
+ def bind(self) -> bool: ...
749
+
750
+ @property
751
+ def auth(self) -> bool: ...
752
+
753
+ def __str__(self) -> str: ...
754
+
755
+ class dyld_chained_ptr_64_rebase_t:
756
+ @property
757
+ def unpack_target(self) -> int: ...
758
+
759
+ @property
760
+ def target(self) -> int: ...
761
+
762
+ @property
763
+ def high8(self) -> int: ...
764
+
765
+ @property
766
+ def reserved(self) -> int: ...
767
+
768
+ @property
769
+ def next(self) -> int: ...
770
+
771
+ @property
772
+ def bind(self) -> bool: ...
773
+
774
+ def __str__(self) -> str: ...
775
+
776
+ class dyld_chained_ptr_arm64e_bind24_t:
777
+ @property
778
+ def ordinal(self) -> int: ...
779
+
780
+ @property
781
+ def zero(self) -> int: ...
782
+
783
+ @property
784
+ def addend(self) -> int: ...
785
+
786
+ @property
787
+ def next(self) -> int: ...
788
+
789
+ @property
790
+ def bind(self) -> bool: ...
791
+
792
+ @property
793
+ def auth(self) -> bool: ...
794
+
795
+ def __str__(self) -> str: ...
796
+
797
+ class dyld_chained_ptr_arm64e_auth_bind24_t:
798
+ @property
799
+ def ordinal(self) -> int: ...
800
+
801
+ @property
802
+ def zero(self) -> int: ...
803
+
804
+ @property
805
+ def diversity(self) -> int: ...
806
+
807
+ @property
808
+ def addr_div(self) -> int: ...
809
+
810
+ @property
811
+ def key(self) -> int: ...
812
+
813
+ @property
814
+ def next(self) -> int: ...
815
+
816
+ @property
817
+ def bind(self) -> bool: ...
818
+
819
+ @property
820
+ def auth(self) -> bool: ...
821
+
822
+ def __str__(self) -> str: ...
823
+
824
+ class dyld_chained_ptr_64_bind_t:
825
+ @property
826
+ def ordinal(self) -> int: ...
827
+
828
+ @property
829
+ def addend(self) -> int: ...
830
+
831
+ @property
832
+ def reserved(self) -> int: ...
833
+
834
+ @property
835
+ def next(self) -> int: ...
836
+
837
+ @property
838
+ def bind(self) -> bool: ...
839
+
840
+ def __str__(self) -> str: ...
841
+
842
+ class dyld_chained_ptr_64_kernel_cache_rebase_t:
843
+ @property
844
+ def ordinal(self) -> int: ...
845
+
846
+ @property
847
+ def cache_level(self) -> int: ...
848
+
849
+ @property
850
+ def diversity(self) -> int: ...
851
+
852
+ @property
853
+ def addr_div(self) -> int: ...
854
+
855
+ @property
856
+ def key(self) -> int: ...
857
+
858
+ @property
859
+ def next(self) -> int: ...
860
+
861
+ @property
862
+ def is_auth(self) -> bool: ...
863
+
864
+ def __str__(self) -> str: ...
865
+
866
+ class dyld_chained_ptr_32_rebase_t:
867
+ @property
868
+ def target(self) -> int: ...
869
+
870
+ @property
871
+ def next(self) -> int: ...
872
+
873
+ @property
874
+ def bind(self) -> int: ...
875
+
876
+ def __str__(self) -> str: ...
877
+
878
+ class dyld_chained_ptr_32_bind_t:
879
+ @property
880
+ def ordinal(self) -> int: ...
881
+
882
+ @property
883
+ def addend(self) -> int: ...
884
+
885
+ @property
886
+ def next(self) -> int: ...
887
+
888
+ @property
889
+ def bind(self) -> bool: ...
890
+
891
+ def __str__(self) -> str: ...
892
+
893
+ class dyld_chained_ptr_32_cache_rebase_t:
894
+ @property
895
+ def target(self) -> int: ...
896
+
897
+ @property
898
+ def next(self) -> int: ...
899
+
900
+ def __str__(self) -> str: ...
901
+
902
+ class dyld_chained_ptr_32_firmware_rebase_t:
903
+ @property
904
+ def target(self) -> int: ...
905
+
906
+ @property
907
+ def next(self) -> int: ...
908
+
909
+ def __str__(self) -> str: ...
910
+
911
+ @staticmethod
912
+ def stride(fmt: DYLD_CHAINED_PTR_FORMAT) -> int: ...
913
+
914
+ @staticmethod
915
+ def from_value(ptr: int, size: int) -> Optional[ChainedPointerAnalysis]: ...
916
+
917
+ @property
918
+ def value(self) -> int: ...
919
+
920
+ @property
921
+ def size(self) -> int: ...
922
+
923
+ @property
924
+ def dyld_chained_ptr_arm64e_rebase(self) -> ChainedPointerAnalysis.dyld_chained_ptr_arm64e_rebase_t: ...
925
+
926
+ @property
927
+ def dyld_chained_ptr_arm64e_bind(self) -> ChainedPointerAnalysis.dyld_chained_ptr_arm64e_bind_t: ...
928
+
929
+ @property
930
+ def dyld_chained_ptr_arm64e_auth_rebase(self) -> ChainedPointerAnalysis.dyld_chained_ptr_arm64e_auth_rebase_t: ...
931
+
932
+ @property
933
+ def dyld_chained_ptr_arm64e_auth_bind(self) -> ChainedPointerAnalysis.dyld_chained_ptr_arm64e_auth_bind_t: ...
934
+
935
+ @property
936
+ def dyld_chained_ptr_64_rebase(self) -> ChainedPointerAnalysis.dyld_chained_ptr_64_rebase_t: ...
937
+
938
+ @property
939
+ def dyld_chained_ptr_arm64e_bind24(self) -> ChainedPointerAnalysis.dyld_chained_ptr_arm64e_bind24_t: ...
940
+
941
+ @property
942
+ def dyld_chained_ptr_arm64e_auth_bind24(self) -> ChainedPointerAnalysis.dyld_chained_ptr_arm64e_auth_bind24_t: ...
943
+
944
+ @property
945
+ def dyld_chained_ptr_64_bind(self) -> ChainedPointerAnalysis.dyld_chained_ptr_64_bind_t: ...
946
+
947
+ @property
948
+ def dyld_chained_ptr_64_kernel_cache_rebase(self) -> ChainedPointerAnalysis.dyld_chained_ptr_64_kernel_cache_rebase_t: ...
949
+
950
+ @property
951
+ def dyld_chained_ptr_32_rebase(self) -> ChainedPointerAnalysis.dyld_chained_ptr_32_rebase_t: ...
952
+
953
+ @property
954
+ def dyld_chained_ptr_32_bind(self) -> ChainedPointerAnalysis.dyld_chained_ptr_32_bind_t: ...
955
+
956
+ @property
957
+ def dyld_chained_ptr_32_cache_rebase(self) -> ChainedPointerAnalysis.dyld_chained_ptr_32_cache_rebase_t: ...
958
+
959
+ @property
960
+ def dyld_chained_ptr_32_firmware_rebase(self) -> ChainedPointerAnalysis.dyld_chained_ptr_32_firmware_rebase_t: ...
961
+
962
+ def get_as(self, arg: DYLD_CHAINED_PTR_FORMAT, /) -> Union[lief.MachO.ChainedPointerAnalysis.dyld_chained_ptr_arm64e_rebase_t, lief.MachO.ChainedPointerAnalysis.dyld_chained_ptr_arm64e_bind_t, lief.MachO.ChainedPointerAnalysis.dyld_chained_ptr_arm64e_auth_rebase_t, lief.MachO.ChainedPointerAnalysis.dyld_chained_ptr_arm64e_auth_bind_t, lief.MachO.ChainedPointerAnalysis.dyld_chained_ptr_64_rebase_t, lief.MachO.ChainedPointerAnalysis.dyld_chained_ptr_arm64e_bind24_t, lief.MachO.ChainedPointerAnalysis.dyld_chained_ptr_arm64e_auth_bind24_t, lief.MachO.ChainedPointerAnalysis.dyld_chained_ptr_64_bind_t, lief.MachO.ChainedPointerAnalysis.dyld_chained_ptr_64_kernel_cache_rebase_t, lief.MachO.ChainedPointerAnalysis.dyld_chained_ptr_32_rebase_t, lief.MachO.ChainedPointerAnalysis.dyld_chained_ptr_32_bind_t, lief.MachO.ChainedPointerAnalysis.dyld_chained_ptr_32_cache_rebase_t, lief.MachO.ChainedPointerAnalysis.dyld_chained_ptr_32_firmware_rebase_t, int, None]: ...
963
+
964
+ class CodeSignature(LoadCommand):
965
+ data_offset: int
966
+
967
+ data_size: int
968
+
969
+ @property
970
+ def content(self) -> memoryview: ...
971
+
972
+ def __str__(self) -> str: ...
973
+
974
+ class CodeSignatureDir(LoadCommand):
975
+ data_offset: int
976
+
977
+ data_size: int
978
+
979
+ @property
980
+ def content(self) -> memoryview: ...
981
+
982
+ def __str__(self) -> str: ...
983
+
984
+ class DYLD_CHAINED_FORMAT(enum.Enum):
985
+ @staticmethod
986
+ def from_value(arg: int, /) -> DYLD_CHAINED_FORMAT: ...
987
+
988
+ def __eq__(self, arg, /) -> bool: ...
989
+
990
+ def __ne__(self, arg, /) -> bool: ...
991
+
992
+ def __int__(self) -> int: ...
993
+
994
+ IMPORT = 1
995
+
996
+ IMPORT_ADDEND = 2
997
+
998
+ IMPORT_ADDEND64 = 3
999
+
1000
+ class DYLD_CHAINED_PTR_FORMAT(enum.Enum):
1001
+ @staticmethod
1002
+ def from_value(arg: int, /) -> DYLD_CHAINED_PTR_FORMAT: ...
1003
+
1004
+ def __eq__(self, arg, /) -> bool: ...
1005
+
1006
+ def __ne__(self, arg, /) -> bool: ...
1007
+
1008
+ def __int__(self) -> int: ...
1009
+
1010
+ NONE = 0
1011
+
1012
+ PTR_ARM64E = 1
1013
+
1014
+ PTR_64 = 2
1015
+
1016
+ PTR_32 = 3
1017
+
1018
+ PTR_32_CACHE = 4
1019
+
1020
+ PTR_32_FIRMWARE = 5
1021
+
1022
+ PTR_64_OFFSET = 6
1023
+
1024
+ PTR_ARM64E_KERNEL = 7
1025
+
1026
+ PTR_64_KERNEL_CACHE = 8
1027
+
1028
+ PTR_ARM64E_USERLAND = 9
1029
+
1030
+ PTR_ARM64E_FIRMWARE = 10
1031
+
1032
+ PTR_X86_64_KERNEL_CACHE = 11
1033
+
1034
+ PTR_ARM64E_USERLAND24 = 12
1035
+
1036
+ class DataCodeEntry(lief.Object):
1037
+ class TYPES(enum.Enum):
1038
+ @staticmethod
1039
+ def from_value(arg: int, /) -> DataCodeEntry.TYPES: ...
1040
+
1041
+ def __eq__(self, arg, /) -> bool: ...
1042
+
1043
+ def __ne__(self, arg, /) -> bool: ...
1044
+
1045
+ def __int__(self) -> int: ...
1046
+
1047
+ UNKNOWN = 0
1048
+
1049
+ DATA = 1
1050
+
1051
+ JUMP_TABLE_8 = 2
1052
+
1053
+ JUMP_TABLE_16 = 3
1054
+
1055
+ JUMP_TABLE_32 = 4
1056
+
1057
+ ABS_JUMP_TABLE_32 = 5
1058
+
1059
+ offset: int
1060
+
1061
+ length: int
1062
+
1063
+ type: lief.MachO.DataCodeEntry.TYPES
1064
+
1065
+ def __str__(self) -> str: ...
1066
+
1067
+ class DataInCode(LoadCommand):
1068
+ data_offset: int
1069
+
1070
+ data_size: int
1071
+
1072
+ @property
1073
+ def entries(self) -> it_data_in_code_entries: ...
1074
+
1075
+ def add(self, entry: DataCodeEntry) -> DataInCode: ...
1076
+
1077
+ @property
1078
+ def content(self) -> memoryview: ...
1079
+
1080
+ def __str__(self) -> str: ...
1081
+
1082
+ class DyldBindingInfo(BindingInfo):
1083
+ class CLASS(enum.Enum):
1084
+ @staticmethod
1085
+ def from_value(arg: int, /) -> DyldBindingInfo.CLASS: ...
1086
+
1087
+ def __eq__(self, arg, /) -> bool: ...
1088
+
1089
+ def __ne__(self, arg, /) -> bool: ...
1090
+
1091
+ def __int__(self) -> int: ...
1092
+
1093
+ WEAK = 1
1094
+
1095
+ LAZY = 2
1096
+
1097
+ STANDARD = 3
1098
+
1099
+ THREADED = 100
1100
+
1101
+ class TYPE(enum.Enum):
1102
+ @staticmethod
1103
+ def from_value(arg: int, /) -> DyldBindingInfo.TYPE: ...
1104
+
1105
+ def __eq__(self, arg, /) -> bool: ...
1106
+
1107
+ def __ne__(self, arg, /) -> bool: ...
1108
+
1109
+ def __int__(self) -> int: ...
1110
+
1111
+ POINTER = 1
1112
+
1113
+ TEXT_ABSOLUTE32 = 2
1114
+
1115
+ TEXT_PCREL32 = 3
1116
+
1117
+ binding_class: lief.MachO.DyldBindingInfo.CLASS
1118
+
1119
+ binding_type: lief.MachO.DyldBindingInfo.TYPE
1120
+
1121
+ @property
1122
+ def original_offset(self) -> int: ...
1123
+
1124
+ def __str__(self) -> str: ...
1125
+
1126
+ class DyldChainedFixups(LoadCommand):
1127
+ class it_binding_info:
1128
+ def __getitem__(self, arg: int, /) -> ChainedBindingInfo: ...
1129
+
1130
+ def __len__(self) -> int: ...
1131
+
1132
+ def __iter__(self) -> DyldChainedFixups.it_binding_info: ...
1133
+
1134
+ def __next__(self) -> ChainedBindingInfo: ...
1135
+
1136
+ class it_chained_starts_in_segments_t:
1137
+ def __getitem__(self, arg: int, /) -> DyldChainedFixups.chained_starts_in_segment: ...
1138
+
1139
+ def __len__(self) -> int: ...
1140
+
1141
+ def __iter__(self) -> DyldChainedFixups.it_chained_starts_in_segments_t: ...
1142
+
1143
+ def __next__(self) -> DyldChainedFixups.chained_starts_in_segment: ...
1144
+
1145
+ class chained_starts_in_segment:
1146
+ @property
1147
+ def offset(self) -> int: ...
1148
+
1149
+ @property
1150
+ def size(self) -> int: ...
1151
+
1152
+ @property
1153
+ def page_size(self) -> int: ...
1154
+
1155
+ @property
1156
+ def segment_offset(self) -> int: ...
1157
+
1158
+ @property
1159
+ def page_start(self) -> list[int]: ...
1160
+
1161
+ @property
1162
+ def pointer_format(self) -> DYLD_CHAINED_PTR_FORMAT: ...
1163
+
1164
+ @property
1165
+ def max_valid_pointer(self) -> int: ...
1166
+
1167
+ @property
1168
+ def page_count(self) -> int: ...
1169
+
1170
+ @property
1171
+ def segment(self) -> SegmentCommand: ...
1172
+
1173
+ def __str__(self) -> str: ...
1174
+
1175
+ data_offset: int
1176
+
1177
+ data_size: int
1178
+
1179
+ @property
1180
+ def payload(self) -> memoryview: ...
1181
+
1182
+ @property
1183
+ def bindings(self) -> DyldChainedFixups.it_binding_info: ...
1184
+
1185
+ @property
1186
+ def chained_starts_in_segments(self) -> DyldChainedFixups.it_chained_starts_in_segments_t: ...
1187
+
1188
+ fixups_version: int
1189
+
1190
+ starts_offset: int
1191
+
1192
+ imports_offset: int
1193
+
1194
+ symbols_offset: int
1195
+
1196
+ imports_count: int
1197
+
1198
+ symbols_format: int
1199
+
1200
+ imports_format: lief.MachO.DYLD_CHAINED_FORMAT
1201
+
1202
+ def __str__(self) -> str: ...
1203
+
1204
+ class DyldEnvironment(LoadCommand):
1205
+ value: str
1206
+
1207
+ def __str__(self) -> str: ...
1208
+
1209
+ class DyldExportsTrie(LoadCommand):
1210
+ class it_export_info:
1211
+ def __getitem__(self, arg: int, /) -> ExportInfo: ...
1212
+
1213
+ def __len__(self) -> int: ...
1214
+
1215
+ def __iter__(self) -> DyldExportsTrie.it_export_info: ...
1216
+
1217
+ def __next__(self) -> ExportInfo: ...
1218
+
1219
+ data_offset: int
1220
+
1221
+ data_size: int
1222
+
1223
+ @property
1224
+ def content(self) -> memoryview: ...
1225
+
1226
+ @property
1227
+ def exports(self) -> DyldExportsTrie.it_export_info: ...
1228
+
1229
+ def show_export_trie(self) -> str: ...
1230
+
1231
+ def __str__(self) -> str: ...
1232
+
1233
+ class DyldInfo(LoadCommand):
1234
+ class REBASE_TYPE(enum.Enum):
1235
+ @staticmethod
1236
+ def from_value(arg: int, /) -> DyldInfo.REBASE_TYPE: ...
1237
+
1238
+ def __eq__(self, arg, /) -> bool: ...
1239
+
1240
+ def __ne__(self, arg, /) -> bool: ...
1241
+
1242
+ def __int__(self) -> int: ...
1243
+
1244
+ POINTER = 1
1245
+
1246
+ TEXT_ABSOLUTE32 = 2
1247
+
1248
+ TEXT_PCREL32 = 3
1249
+
1250
+ THREADED = 102
1251
+
1252
+ class REBASE_OPCODES(enum.Enum):
1253
+ @staticmethod
1254
+ def from_value(arg: int, /) -> DyldInfo.REBASE_OPCODES: ...
1255
+
1256
+ def __eq__(self, arg, /) -> bool: ...
1257
+
1258
+ def __ne__(self, arg, /) -> bool: ...
1259
+
1260
+ def __int__(self) -> int: ...
1261
+
1262
+ DONE = 0
1263
+
1264
+ SET_TYPE_IMM = 16
1265
+
1266
+ SET_SEGMENT_AND_OFFSET_ULEB = 32
1267
+
1268
+ ADD_ADDR_ULEB = 48
1269
+
1270
+ ADD_ADDR_IMM_SCALED = 64
1271
+
1272
+ DO_REBASE_IMM_TIMES = 80
1273
+
1274
+ DO_REBASE_ULEB_TIMES = 96
1275
+
1276
+ DO_REBASE_ADD_ADDR_ULEB = 112
1277
+
1278
+ DO_REBASE_ULEB_TIMES_SKIPPING_ULEB = 128
1279
+
1280
+ class BIND_OPCODES(enum.Enum):
1281
+ @staticmethod
1282
+ def from_value(arg: int, /) -> DyldInfo.BIND_OPCODES: ...
1283
+
1284
+ def __eq__(self, arg, /) -> bool: ...
1285
+
1286
+ def __ne__(self, arg, /) -> bool: ...
1287
+
1288
+ def __int__(self) -> int: ...
1289
+
1290
+ DONE = 0
1291
+
1292
+ SET_DYLIB_ORDINAL_IMM = 16
1293
+
1294
+ SET_DYLIB_ORDINAL_ULEB = 32
1295
+
1296
+ SET_DYLIB_SPECIAL_IMM = 48
1297
+
1298
+ SET_SYMBOL_TRAILING_FLAGS_IMM = 64
1299
+
1300
+ SET_TYPE_IMM = 80
1301
+
1302
+ SET_ADDEND_SLEB = 96
1303
+
1304
+ SET_SEGMENT_AND_OFFSET_ULEB = 112
1305
+
1306
+ ADD_ADDR_ULEB = 128
1307
+
1308
+ DO_BIND = 144
1309
+
1310
+ DO_BIND_ADD_ADDR_ULEB = 160
1311
+
1312
+ DO_BIND_ADD_ADDR_IMM_SCALED = 176
1313
+
1314
+ DO_BIND_ULEB_TIMES_SKIPPING_ULEB = 192
1315
+
1316
+ THREADED_APPLY = 209
1317
+
1318
+ THREADED = 208
1319
+
1320
+ class it_binding_info:
1321
+ def __getitem__(self, arg: int, /) -> DyldBindingInfo: ...
1322
+
1323
+ def __len__(self) -> int: ...
1324
+
1325
+ def __iter__(self) -> DyldInfo.it_binding_info: ...
1326
+
1327
+ def __next__(self) -> DyldBindingInfo: ...
1328
+
1329
+ class it_export_info:
1330
+ def __getitem__(self, arg: int, /) -> ExportInfo: ...
1331
+
1332
+ def __len__(self) -> int: ...
1333
+
1334
+ def __iter__(self) -> DyldInfo.it_export_info: ...
1335
+
1336
+ def __next__(self) -> ExportInfo: ...
1337
+
1338
+ rebase: tuple[int, int]
1339
+
1340
+ rebase_opcodes: memoryview
1341
+
1342
+ @property
1343
+ def show_rebases_opcodes(self) -> str: ...
1344
+
1345
+ bind: tuple[int, int]
1346
+
1347
+ bind_opcodes: memoryview
1348
+
1349
+ @property
1350
+ def show_bind_opcodes(self) -> str: ...
1351
+
1352
+ weak_bind: tuple[int, int]
1353
+
1354
+ weak_bind_opcodes: memoryview
1355
+
1356
+ @property
1357
+ def show_weak_bind_opcodes(self) -> str: ...
1358
+
1359
+ lazy_bind: tuple[int, int]
1360
+
1361
+ lazy_bind_opcodes: memoryview
1362
+
1363
+ @property
1364
+ def show_lazy_bind_opcodes(self) -> str: ...
1365
+
1366
+ @property
1367
+ def bindings(self) -> DyldInfo.it_binding_info: ...
1368
+
1369
+ export_info: tuple[int, int]
1370
+
1371
+ export_trie: memoryview
1372
+
1373
+ @property
1374
+ def exports(self) -> DyldExportsTrie.it_export_info: ...
1375
+
1376
+ @property
1377
+ def show_export_trie(self) -> str: ...
1378
+
1379
+ def set_rebase_offset(self, offset: int) -> None: ...
1380
+
1381
+ def set_rebase_size(self, size: int) -> None: ...
1382
+
1383
+ def set_bind_offset(self, offset: int) -> None: ...
1384
+
1385
+ def set_bind_size(self, size: int) -> None: ...
1386
+
1387
+ def set_weak_bind_offset(self, offset: int) -> None: ...
1388
+
1389
+ def set_weak_bind_size(self, size: int) -> None: ...
1390
+
1391
+ def set_lazy_bind_offset(self, offset: int) -> None: ...
1392
+
1393
+ def set_lazy_bind_size(self, size: int) -> None: ...
1394
+
1395
+ def set_export_offset(self, offset: int) -> None: ...
1396
+
1397
+ def set_export_size(self, size: int) -> None: ...
1398
+
1399
+ def __str__(self) -> str: ...
1400
+
1401
+ class DylibCommand(LoadCommand):
1402
+ name: str
1403
+
1404
+ timestamp: int
1405
+
1406
+ current_version: list[int]
1407
+
1408
+ compatibility_version: list[int]
1409
+
1410
+ @staticmethod
1411
+ def weak_lib(name: str, timestamp: int = 0, current_version: int = 0, compat_version: int = 0) -> DylibCommand: ...
1412
+
1413
+ @staticmethod
1414
+ def id_dylib(name: str, timestamp: int = 0, current_version: int = 0, compat_version: int = 0) -> DylibCommand: ...
1415
+
1416
+ @staticmethod
1417
+ def load_dylib(name: str, timestamp: int = 0, current_version: int = 0, compat_version: int = 0) -> DylibCommand: ...
1418
+
1419
+ @staticmethod
1420
+ def reexport_dylib(name: str, timestamp: int = 0, current_version: int = 0, compat_version: int = 0) -> DylibCommand: ...
1421
+
1422
+ @staticmethod
1423
+ def load_upward_dylib(name: str, timestamp: int = 0, current_version: int = 0, compat_version: int = 0) -> DylibCommand: ...
1424
+
1425
+ @staticmethod
1426
+ def lazy_load_dylib(name: str, timestamp: int = 0, current_version: int = 0, compat_version: int = 0) -> DylibCommand: ...
1427
+
1428
+ def __str__(self) -> str: ...
1429
+
1430
+ class DylinkerCommand(LoadCommand):
1431
+ def __init__(self, arg: str, /) -> None: ...
1432
+
1433
+ name: str
1434
+
1435
+ def __str__(self) -> str: ...
1436
+
1437
+ class DynamicSymbolCommand(LoadCommand):
1438
+ class it_indirect_symbols:
1439
+ def __getitem__(self, arg: int, /) -> Symbol: ...
1440
+
1441
+ def __len__(self) -> int: ...
1442
+
1443
+ def __iter__(self) -> DynamicSymbolCommand.it_indirect_symbols: ...
1444
+
1445
+ def __next__(self) -> Symbol: ...
1446
+
1447
+ idx_local_symbol: int
1448
+
1449
+ nb_local_symbols: int
1450
+
1451
+ idx_external_define_symbol: int
1452
+
1453
+ nb_external_define_symbols: int
1454
+
1455
+ idx_undefined_symbol: int
1456
+
1457
+ nb_undefined_symbols: int
1458
+
1459
+ toc_offset: int
1460
+
1461
+ nb_toc: int
1462
+
1463
+ module_table_offset: int
1464
+
1465
+ nb_module_table: int
1466
+
1467
+ external_reference_symbol_offset: int
1468
+
1469
+ nb_external_reference_symbols: int
1470
+
1471
+ indirect_symbol_offset: int
1472
+
1473
+ nb_indirect_symbols: int
1474
+
1475
+ external_relocation_offset: int
1476
+
1477
+ nb_external_relocations: int
1478
+
1479
+ local_relocation_offset: int
1480
+
1481
+ nb_local_relocations: int
1482
+
1483
+ @property
1484
+ def indirect_symbols(self) -> DynamicSymbolCommand.it_indirect_symbols: ...
1485
+
1486
+ def __str__(self) -> str: ...
1487
+
1488
+ class EncryptionInfo(LoadCommand):
1489
+ crypt_offset: int
1490
+
1491
+ crypt_size: int
1492
+
1493
+ crypt_id: int
1494
+
1495
+ def __str__(self) -> str: ...
1496
+
1497
+ class ExportInfo(lief.Object):
1498
+ class KIND(enum.Enum):
1499
+ @staticmethod
1500
+ def from_value(arg: int, /) -> ExportInfo.KIND: ...
1501
+
1502
+ def __eq__(self, arg, /) -> bool: ...
1503
+
1504
+ def __ne__(self, arg, /) -> bool: ...
1505
+
1506
+ def __int__(self) -> int: ...
1507
+
1508
+ REGULAR = 0
1509
+
1510
+ THREAD_LOCAL_KIND = 1
1511
+
1512
+ ABSOLUTE_KIND = 2
1513
+
1514
+ class FLAGS(enum.Flag):
1515
+ @staticmethod
1516
+ def from_value(arg: int, /) -> ExportInfo.FLAGS: ...
1517
+
1518
+ def __eq__(self, arg, /) -> bool: ...
1519
+
1520
+ def __ne__(self, arg, /) -> bool: ...
1521
+
1522
+ def __int__(self) -> int: ...
1523
+
1524
+ WEAK_DEFINITION = 4
1525
+
1526
+ REEXPORT = 8
1527
+
1528
+ STUB_AND_RESOLVER = 16
1529
+
1530
+ @property
1531
+ def node_offset(self) -> int: ...
1532
+
1533
+ @property
1534
+ def kind(self) -> ExportInfo.KIND: ...
1535
+
1536
+ @property
1537
+ def flags_list(self) -> list[ExportInfo.FLAGS]: ...
1538
+
1539
+ flags: int
1540
+
1541
+ address: int
1542
+
1543
+ @property
1544
+ def alias(self) -> Symbol: ...
1545
+
1546
+ @property
1547
+ def alias_library(self) -> DylibCommand: ...
1548
+
1549
+ @property
1550
+ def has_symbol(self) -> bool: ...
1551
+
1552
+ def has(self, flag: ExportInfo.FLAGS) -> bool: ...
1553
+
1554
+ @property
1555
+ def symbol(self) -> Symbol: ...
1556
+
1557
+ def __str__(self) -> str: ...
1558
+
1559
+ class FatBinary:
1560
+ class it_binaries:
1561
+ def __getitem__(self, arg: int, /) -> Binary: ...
1562
+
1563
+ def __len__(self) -> int: ...
1564
+
1565
+ def __iter__(self) -> FatBinary.it_binaries: ...
1566
+
1567
+ def __next__(self) -> Binary: ...
1568
+
1569
+ @property
1570
+ def size(self) -> int: ...
1571
+
1572
+ def at(self, index: int) -> Binary: ...
1573
+
1574
+ def take(self, cpu: Header.CPU_TYPE) -> Optional[Binary]: ...
1575
+
1576
+ def write(self, filename: str) -> None: ...
1577
+
1578
+ def raw(self) -> list[int]: ...
1579
+
1580
+ def __len__(self) -> int: ...
1581
+
1582
+ def __getitem__(self, arg: int, /) -> Binary: ...
1583
+
1584
+ def __iter__(self) -> FatBinary.it_binaries: ...
1585
+
1586
+ def __str__(self) -> str: ...
1587
+
1588
+ class FilesetCommand(LoadCommand):
1589
+ name: str
1590
+
1591
+ virtual_address: int
1592
+
1593
+ file_offset: int
1594
+
1595
+ @property
1596
+ def binary(self) -> Binary: ...
1597
+
1598
+ def __str__(self) -> str: ...
1599
+
1600
+ class FunctionStarts(LoadCommand):
1601
+ data_offset: int
1602
+
1603
+ data_size: int
1604
+
1605
+ functions: list[int]
1606
+
1607
+ def add_function(self, address: int) -> None: ...
1608
+
1609
+ @property
1610
+ def content(self) -> memoryview: ...
1611
+
1612
+ def __str__(self) -> str: ...
1613
+
1614
+ class Header(lief.Object):
1615
+ def __init__(self) -> None: ...
1616
+
1617
+ class CPU_TYPE(enum.Enum):
1618
+ @staticmethod
1619
+ def from_value(arg: int, /) -> Header.CPU_TYPE: ...
1620
+
1621
+ def __eq__(self, arg, /) -> bool: ...
1622
+
1623
+ def __ne__(self, arg, /) -> bool: ...
1624
+
1625
+ def __int__(self) -> int: ...
1626
+
1627
+ ANY = -1
1628
+
1629
+ X86 = 7
1630
+
1631
+ X86_64 = 16777223
1632
+
1633
+ MIPS = 8
1634
+
1635
+ MC98000 = 10
1636
+
1637
+ ARM = 12
1638
+
1639
+ ARM64 = 16777228
1640
+
1641
+ SPARC = 14
1642
+
1643
+ POWERPC = 18
1644
+
1645
+ POWERPC64 = 16777234
1646
+
1647
+ class FILE_TYPE(enum.Enum):
1648
+ @staticmethod
1649
+ def from_value(arg: int, /) -> Header.FILE_TYPE: ...
1650
+
1651
+ def __eq__(self, arg, /) -> bool: ...
1652
+
1653
+ def __ne__(self, arg, /) -> bool: ...
1654
+
1655
+ def __int__(self) -> int: ...
1656
+
1657
+ UNKNOWN = 0
1658
+
1659
+ OBJECT = 1
1660
+
1661
+ EXECUTE = 2
1662
+
1663
+ FVMLIB = 3
1664
+
1665
+ CORE = 4
1666
+
1667
+ PRELOAD = 5
1668
+
1669
+ DYLIB = 6
1670
+
1671
+ DYLINKER = 7
1672
+
1673
+ BUNDLE = 8
1674
+
1675
+ DYLIB_STUB = 9
1676
+
1677
+ DSYM = 10
1678
+
1679
+ KEXT_BUNDLE = 11
1680
+
1681
+ class FLAGS(enum.Flag):
1682
+ @staticmethod
1683
+ def from_value(arg: int, /) -> Header.FLAGS: ...
1684
+
1685
+ def __eq__(self, arg, /) -> bool: ...
1686
+
1687
+ def __ne__(self, arg, /) -> bool: ...
1688
+
1689
+ def __int__(self) -> int: ...
1690
+
1691
+ NOUNDEFS = 1
1692
+
1693
+ INCRLINK = 2
1694
+
1695
+ DYLDLINK = 4
1696
+
1697
+ BINDATLOAD = 8
1698
+
1699
+ PREBOUND = 16
1700
+
1701
+ SPLIT_SEGS = 32
1702
+
1703
+ LAZY_INIT = 64
1704
+
1705
+ TWOLEVEL = 128
1706
+
1707
+ FORCE_FLAT = 256
1708
+
1709
+ NOMULTIDEFS = 512
1710
+
1711
+ NOFIXPREBINDING = 1024
1712
+
1713
+ PREBINDABLE = 2048
1714
+
1715
+ ALLMODSBOUND = 4096
1716
+
1717
+ SUBSECTIONS_VIA_SYMBOLS = 8192
1718
+
1719
+ CANONICAL = 16384
1720
+
1721
+ WEAK_DEFINES = 32768
1722
+
1723
+ BINDS_TO_WEAK = 65536
1724
+
1725
+ ALLOW_STACK_EXECUTION = 131072
1726
+
1727
+ ROOT_SAFE = 262144
1728
+
1729
+ SETUID_SAFE = 524288
1730
+
1731
+ NO_REEXPORTED_DYLIBS = 1048576
1732
+
1733
+ PIE = 2097152
1734
+
1735
+ DEAD_STRIPPABLE_DYLIB = 4194304
1736
+
1737
+ HAS_TLV_DESCRIPTORS = 8388608
1738
+
1739
+ NO_HEAP_EXECUTION = 16777216
1740
+
1741
+ APP_EXTENSION_SAFE = 33554432
1742
+
1743
+ magic: lief.MachO.MACHO_TYPES
1744
+
1745
+ cpu_type: lief.MachO.Header.CPU_TYPE
1746
+
1747
+ cpu_subtype: int
1748
+
1749
+ file_type: lief.MachO.Header.FILE_TYPE
1750
+
1751
+ flags: int
1752
+
1753
+ nb_cmds: int
1754
+
1755
+ sizeof_cmds: int
1756
+
1757
+ reserved: int
1758
+
1759
+ @property
1760
+ def flags_list(self) -> list[Header.FLAGS]: ...
1761
+
1762
+ def add(self, flag: Header.FLAGS) -> None: ...
1763
+
1764
+ def remove(self, flag: Header.FLAGS) -> None: ...
1765
+
1766
+ def has(self, flag: Header.FLAGS) -> bool: ...
1767
+
1768
+ def __iadd__(self, arg: Header.FLAGS, /) -> Header: ...
1769
+
1770
+ def __isub__(self, arg: Header.FLAGS, /) -> Header: ...
1771
+
1772
+ def __contains__(self, arg: Header.FLAGS, /) -> bool: ...
1773
+
1774
+ def __str__(self) -> str: ...
1775
+
1776
+ class IndirectBindingInfo(BindingInfo):
1777
+ pass
1778
+
1779
+ class LinkEdit(SegmentCommand):
1780
+ pass
1781
+
1782
+ class LinkerOptHint(LoadCommand):
1783
+ data_offset: int
1784
+
1785
+ data_size: int
1786
+
1787
+ @property
1788
+ def content(self) -> memoryview: ...
1789
+
1790
+ def __str__(self) -> str: ...
1791
+
1792
+ class LoadCommand(lief.Object):
1793
+ def __init__(self) -> None: ...
1794
+
1795
+ class TYPE(enum.Enum):
1796
+ @staticmethod
1797
+ def from_value(arg: int, /) -> LoadCommand.TYPE: ...
1798
+
1799
+ def __eq__(self, arg, /) -> bool: ...
1800
+
1801
+ def __ne__(self, arg, /) -> bool: ...
1802
+
1803
+ def __int__(self) -> int: ...
1804
+
1805
+ UNKNOWN = 0
1806
+
1807
+ SEGMENT = 1
1808
+
1809
+ SYMTAB = 2
1810
+
1811
+ SYMSEG = 3
1812
+
1813
+ THREAD = 4
1814
+
1815
+ UNIXTHREAD = 5
1816
+
1817
+ LOADFVMLIB = 6
1818
+
1819
+ IDFVMLIB = 7
1820
+
1821
+ IDENT = 8
1822
+
1823
+ FVMFILE = 9
1824
+
1825
+ PREPAGE = 10
1826
+
1827
+ DYSYMTAB = 11
1828
+
1829
+ LOAD_DYLIB = 12
1830
+
1831
+ ID_DYLIB = 13
1832
+
1833
+ LOAD_DYLINKER = 14
1834
+
1835
+ ID_DYLINKER = 15
1836
+
1837
+ PREBOUND_DYLIB = 16
1838
+
1839
+ ROUTINES = 17
1840
+
1841
+ SUB_FRAMEWORK = 18
1842
+
1843
+ SUB_UMBRELLA = 19
1844
+
1845
+ SUB_CLIENT = 20
1846
+
1847
+ SUB_LIBRARY = 21
1848
+
1849
+ TWOLEVEL_HINTS = 22
1850
+
1851
+ PREBIND_CKSUM = 23
1852
+
1853
+ LOAD_WEAK_DYLIB = 2147483672
1854
+
1855
+ SEGMENT_64 = 25
1856
+
1857
+ ROUTINES_64 = 26
1858
+
1859
+ UUID = 27
1860
+
1861
+ RPATH = 2147483676
1862
+
1863
+ CODE_SIGNATURE = 29
1864
+
1865
+ SEGMENT_SPLIT_INFO = 30
1866
+
1867
+ REEXPORT_DYLIB = 2147483679
1868
+
1869
+ LAZY_LOAD_DYLIB = 32
1870
+
1871
+ ENCRYPTION_INFO = 33
1872
+
1873
+ DYLD_INFO = 34
1874
+
1875
+ DYLD_INFO_ONLY = 2147483682
1876
+
1877
+ LOAD_UPWARD_DYLIB = 2147483683
1878
+
1879
+ VERSION_MIN_MACOSX = 36
1880
+
1881
+ VERSION_MIN_IPHONEOS = 37
1882
+
1883
+ FUNCTION_STARTS = 38
1884
+
1885
+ DYLD_ENVIRONMENT = 39
1886
+
1887
+ MAIN = 2147483688
1888
+
1889
+ DATA_IN_CODE = 41
1890
+
1891
+ SOURCE_VERSION = 42
1892
+
1893
+ DYLIB_CODE_SIGN_DRS = 43
1894
+
1895
+ ENCRYPTION_INFO_64 = 44
1896
+
1897
+ LINKER_OPTION = 45
1898
+
1899
+ LINKER_OPTIMIZATION_HINT = 46
1900
+
1901
+ VERSION_MIN_TVOS = 47
1902
+
1903
+ VERSION_MIN_WATCHOS = 48
1904
+
1905
+ NOTE = 49
1906
+
1907
+ BUILD_VERSION = 50
1908
+
1909
+ DYLD_EXPORTS_TRIE = 2147483699
1910
+
1911
+ DYLD_CHAINED_FIXUPS = 2147483700
1912
+
1913
+ FILESET_ENTRY = 2147483701
1914
+
1915
+ LIEF_UNKNOWN = 4293787649
1916
+
1917
+ command: lief.MachO.LoadCommand.TYPE
1918
+
1919
+ size: int
1920
+
1921
+ data: memoryview
1922
+
1923
+ command_offset: int
1924
+
1925
+ def __str__(self) -> str: ...
1926
+
1927
+ class MACHO_TYPES(enum.Enum):
1928
+ @staticmethod
1929
+ def from_value(arg: int, /) -> MACHO_TYPES: ...
1930
+
1931
+ def __eq__(self, arg, /) -> bool: ...
1932
+
1933
+ def __ne__(self, arg, /) -> bool: ...
1934
+
1935
+ def __int__(self) -> int: ...
1936
+
1937
+ MAGIC = 4277009102
1938
+
1939
+ CIGAM = 3472551422
1940
+
1941
+ MAGIC_64 = 4277009103
1942
+
1943
+ CIGAM_64 = 3489328638
1944
+
1945
+ FAT_MAGIC = 3405691582
1946
+
1947
+ FAT_CIGAM = 3199925962
1948
+
1949
+ NEURAL_MODEL = 3203398350
1950
+
1951
+ class MainCommand(LoadCommand):
1952
+ def __init__(self, arg0: int, arg1: int, /) -> None: ...
1953
+
1954
+ entrypoint: int
1955
+
1956
+ stack_size: int
1957
+
1958
+ def __str__(self) -> str: ...
1959
+
1960
+ class PPC_RELOCATION(enum.Enum):
1961
+ @staticmethod
1962
+ def from_value(arg: int, /) -> PPC_RELOCATION: ...
1963
+
1964
+ def __eq__(self, arg, /) -> bool: ...
1965
+
1966
+ def __ne__(self, arg, /) -> bool: ...
1967
+
1968
+ def __int__(self) -> int: ...
1969
+
1970
+ VANILLA = 0
1971
+
1972
+ PAIR = 1
1973
+
1974
+ BR14 = 2
1975
+
1976
+ BR24 = 3
1977
+
1978
+ HI16 = 4
1979
+
1980
+ LO16 = 5
1981
+
1982
+ HA16 = 6
1983
+
1984
+ LO14 = 7
1985
+
1986
+ SECTDIFF = 8
1987
+
1988
+ PB_LA_PTR = 9
1989
+
1990
+ HI16_SECTDIFF = 10
1991
+
1992
+ LO16_SECTDIFF = 11
1993
+
1994
+ HA16_SECTDIFF = 12
1995
+
1996
+ JBSR = 13
1997
+
1998
+ LO14_SECTDIFF = 14
1999
+
2000
+ LOCAL_SECTDIFF = 15
2001
+
2002
+ class ParserConfig:
2003
+ def __init__(self) -> None: ...
2004
+
2005
+ parse_dyld_exports: bool
2006
+
2007
+ parse_dyld_bindings: bool
2008
+
2009
+ parse_dyld_rebases: bool
2010
+
2011
+ fix_from_memory: bool
2012
+
2013
+ from_dyld_shared_cache: bool
2014
+
2015
+ def full_dyldinfo(self, flag: bool) -> ParserConfig: ...
2016
+
2017
+ deep: lief.MachO.ParserConfig = ...
2018
+
2019
+ quick: lief.MachO.ParserConfig = ...
2020
+
2021
+ class RPathCommand(LoadCommand):
2022
+ @staticmethod
2023
+ def create(path: str) -> Optional[RPathCommand]: ...
2024
+
2025
+ path: str
2026
+
2027
+ def __str__(self) -> str: ...
2028
+
2029
+ class Relocation(lief.Relocation):
2030
+ class ORIGIN(enum.Enum):
2031
+ @staticmethod
2032
+ def from_value(arg: int, /) -> Relocation.ORIGIN: ...
2033
+
2034
+ def __eq__(self, arg, /) -> bool: ...
2035
+
2036
+ def __ne__(self, arg, /) -> bool: ...
2037
+
2038
+ def __int__(self) -> int: ...
2039
+
2040
+ UNKNOWN = 0
2041
+
2042
+ DYLDINFO = 1
2043
+
2044
+ RELOC_TABLE = 2
2045
+
2046
+ CHAINED_FIXUPS = 3
2047
+
2048
+ address: int
2049
+
2050
+ pc_relative: bool
2051
+
2052
+ type: Union[lief.MachO.X86_RELOCATION, lief.MachO.X86_64_RELOCATION, lief.MachO.PPC_RELOCATION, lief.MachO.ARM_RELOCATION, lief.MachO.ARM64_RELOCATION, lief.MachO.DyldInfo.REBASE_TYPE, ]
2053
+
2054
+ @property
2055
+ def architecture(self) -> Header.CPU_TYPE: ...
2056
+
2057
+ @property
2058
+ def has_symbol(self) -> bool: ...
2059
+
2060
+ @property
2061
+ def symbol(self) -> Symbol: ...
2062
+
2063
+ @property
2064
+ def has_section(self) -> bool: ...
2065
+
2066
+ @property
2067
+ def section(self) -> Section: ...
2068
+
2069
+ @property
2070
+ def origin(self) -> Relocation.ORIGIN: ...
2071
+
2072
+ @property
2073
+ def has_segment(self) -> bool: ...
2074
+
2075
+ @property
2076
+ def segment(self) -> SegmentCommand: ...
2077
+
2078
+ def __str__(self) -> str: ...
2079
+
2080
+ class RelocationDyld(Relocation):
2081
+ def __le__(self, arg: RelocationDyld, /) -> bool: ...
2082
+
2083
+ def __lt__(self, arg: RelocationDyld, /) -> bool: ...
2084
+
2085
+ def __ge__(self, arg: RelocationDyld, /) -> bool: ...
2086
+
2087
+ def __gt__(self, arg: RelocationDyld, /) -> bool: ...
2088
+
2089
+ def __str__(self) -> str: ...
2090
+
2091
+ class RelocationFixup(Relocation):
2092
+ target: int
2093
+
2094
+ next: int
2095
+
2096
+ def __str__(self) -> str: ...
2097
+
2098
+ class RelocationObject(Relocation):
2099
+ value: int
2100
+
2101
+ @property
2102
+ def is_scattered(self) -> bool: ...
2103
+
2104
+ def __str__(self) -> str: ...
2105
+
2106
+ class Routine(LoadCommand):
2107
+ init_address: int
2108
+
2109
+ init_module: int
2110
+
2111
+ reserved1: int
2112
+
2113
+ reserved2: int
2114
+
2115
+ reserved3: int
2116
+
2117
+ reserved4: int
2118
+
2119
+ reserved5: int
2120
+
2121
+ reserved6: int
2122
+
2123
+ def __str__(self) -> str: ...
2124
+
2125
+ class Section(lief.Section):
2126
+ @overload
2127
+ def __init__(self) -> None: ...
2128
+
2129
+ @overload
2130
+ def __init__(self, section_name: str) -> None: ...
2131
+
2132
+ @overload
2133
+ def __init__(self, section_name: str, content: Sequence[int]) -> None: ...
2134
+
2135
+ class it_relocations:
2136
+ def __getitem__(self, arg: int, /) -> Relocation: ...
2137
+
2138
+ def __len__(self) -> int: ...
2139
+
2140
+ def __iter__(self) -> Section.it_relocations: ...
2141
+
2142
+ def __next__(self) -> Relocation: ...
2143
+
2144
+ class TYPE(enum.Enum):
2145
+ @staticmethod
2146
+ def from_value(arg: int, /) -> Section.TYPE: ...
2147
+
2148
+ def __eq__(self, arg, /) -> bool: ...
2149
+
2150
+ def __ne__(self, arg, /) -> bool: ...
2151
+
2152
+ def __int__(self) -> int: ...
2153
+
2154
+ REGULAR = 0
2155
+
2156
+ ZEROFILL = 1
2157
+
2158
+ CSTRING_LITERALS = 2
2159
+
2160
+ S_4BYTE_LITERALS = 3
2161
+
2162
+ S_8BYTE_LITERALS = 4
2163
+
2164
+ LITERAL_POINTERS = 5
2165
+
2166
+ NON_LAZY_SYMBOL_POINTERS = 6
2167
+
2168
+ LAZY_SYMBOL_POINTERS = 7
2169
+
2170
+ SYMBOL_STUBS = 8
2171
+
2172
+ MOD_INIT_FUNC_POINTERS = 9
2173
+
2174
+ MOD_TERM_FUNC_POINTERS = 10
2175
+
2176
+ COALESCED = 11
2177
+
2178
+ GB_ZEROFILL = 12
2179
+
2180
+ INTERPOSING = 13
2181
+
2182
+ S_16BYTE_LITERALS = 14
2183
+
2184
+ DTRACE_DOF = 15
2185
+
2186
+ LAZY_DYLIB_SYMBOL_POINTERS = 16
2187
+
2188
+ THREAD_LOCAL_REGULAR = 17
2189
+
2190
+ THREAD_LOCAL_ZEROFILL = 18
2191
+
2192
+ THREAD_LOCAL_VARIABLES = 19
2193
+
2194
+ THREAD_LOCAL_VARIABLE_POINTERS = 20
2195
+
2196
+ THREAD_LOCAL_INIT_FUNCTION_POINTERS = 21
2197
+
2198
+ INIT_FUNC_OFFSETS = 22
2199
+
2200
+ class FLAGS(enum.Flag):
2201
+ @staticmethod
2202
+ def from_value(arg: int, /) -> Section.FLAGS: ...
2203
+
2204
+ def __eq__(self, arg, /) -> bool: ...
2205
+
2206
+ def __ne__(self, arg, /) -> bool: ...
2207
+
2208
+ def __int__(self) -> int: ...
2209
+
2210
+ PURE_INSTRUCTIONS = 2147483648
2211
+
2212
+ NO_TOC = 1073741824
2213
+
2214
+ STRIP_STATIC_SYMS = 536870912
2215
+
2216
+ NO_DEAD_STRIP = 268435456
2217
+
2218
+ LIVE_SUPPORT = 134217728
2219
+
2220
+ SELF_MODIFYING_CODE = 67108864
2221
+
2222
+ DEBUG_INFO = 33554432
2223
+
2224
+ SOME_INSTRUCTIONS = 1024
2225
+
2226
+ EXT_RELOC = 512
2227
+
2228
+ LOC_RELOC = 256
2229
+
2230
+ alignment: int
2231
+
2232
+ relocation_offset: int
2233
+
2234
+ numberof_relocations: int
2235
+
2236
+ type: lief.MachO.Section.TYPE
2237
+
2238
+ @property
2239
+ def relocations(self) -> SegmentCommand.it_relocations: ...
2240
+
2241
+ reserved1: int
2242
+
2243
+ reserved2: int
2244
+
2245
+ reserved3: int
2246
+
2247
+ flags: lief.MachO.Section.FLAGS
2248
+
2249
+ @property
2250
+ def flags_list(self) -> list[Section.FLAGS]: ...
2251
+
2252
+ @property
2253
+ def segment(self) -> SegmentCommand: ...
2254
+
2255
+ segment_name: str
2256
+
2257
+ @property
2258
+ def has_segment(self) -> bool: ...
2259
+
2260
+ def has(self, flag: Section.FLAGS) -> bool: ...
2261
+
2262
+ def add(self, flag: Section.FLAGS) -> None: ...
2263
+
2264
+ def remove(self, flag: Section.FLAGS) -> None: ...
2265
+
2266
+ def __iadd__(self, arg: Section.FLAGS, /) -> Section: ...
2267
+
2268
+ def __isub__(self, arg: Section.FLAGS, /) -> Section: ...
2269
+
2270
+ def __contains__(self, arg: Section.FLAGS, /) -> bool: ...
2271
+
2272
+ def __str__(self) -> str: ...
2273
+
2274
+ class SegmentCommand(LoadCommand):
2275
+ @overload
2276
+ def __init__(self) -> None: ...
2277
+
2278
+ @overload
2279
+ def __init__(self, arg: str, /) -> None: ...
2280
+
2281
+ @overload
2282
+ def __init__(self, arg0: str, arg1: Sequence[int], /) -> None: ...
2283
+
2284
+ class it_sections:
2285
+ def __getitem__(self, arg: int, /) -> Section: ...
2286
+
2287
+ def __len__(self) -> int: ...
2288
+
2289
+ def __iter__(self) -> SegmentCommand.it_sections: ...
2290
+
2291
+ def __next__(self) -> Section: ...
2292
+
2293
+ class it_relocations:
2294
+ def __getitem__(self, arg: int, /) -> Relocation: ...
2295
+
2296
+ def __len__(self) -> int: ...
2297
+
2298
+ def __iter__(self) -> SegmentCommand.it_relocations: ...
2299
+
2300
+ def __next__(self) -> Relocation: ...
2301
+
2302
+ class VM_PROTECTIONS(enum.Enum):
2303
+ @staticmethod
2304
+ def from_value(arg: int, /) -> SegmentCommand.VM_PROTECTIONS: ...
2305
+
2306
+ def __eq__(self, arg, /) -> bool: ...
2307
+
2308
+ def __ne__(self, arg, /) -> bool: ...
2309
+
2310
+ def __int__(self) -> int: ...
2311
+
2312
+ R = 1
2313
+
2314
+ W = 2
2315
+
2316
+ X = 4
2317
+
2318
+ class FLAGS(enum.Enum):
2319
+ @staticmethod
2320
+ def from_value(arg: int, /) -> SegmentCommand.FLAGS: ...
2321
+
2322
+ def __eq__(self, arg, /) -> bool: ...
2323
+
2324
+ def __ne__(self, arg, /) -> bool: ...
2325
+
2326
+ def __int__(self) -> int: ...
2327
+
2328
+ HIGHVM = 1
2329
+
2330
+ FVMLIB = 2
2331
+
2332
+ NORELOC = 4
2333
+
2334
+ PROTECTED_VERSION_1 = 8
2335
+
2336
+ READ_ONLY = 16
2337
+
2338
+ name: Union[str, bytes]
2339
+
2340
+ virtual_address: int
2341
+
2342
+ virtual_size: int
2343
+
2344
+ file_size: int
2345
+
2346
+ file_offset: int
2347
+
2348
+ max_protection: int
2349
+
2350
+ init_protection: int
2351
+
2352
+ numberof_sections: int
2353
+
2354
+ @property
2355
+ def sections(self) -> SegmentCommand.it_sections: ...
2356
+
2357
+ @property
2358
+ def relocations(self) -> SegmentCommand.it_relocations: ...
2359
+
2360
+ @property
2361
+ def index(self) -> int: ...
2362
+
2363
+ content: memoryview
2364
+
2365
+ flags: int
2366
+
2367
+ def has(self, section: Section) -> bool: ...
2368
+
2369
+ def has_section(self, section_name: str) -> bool: ...
2370
+
2371
+ def add_section(self, section: Section) -> Section: ...
2372
+
2373
+ def get_section(self, name: str) -> Section: ...
2374
+
2375
+ def __str__(self) -> str: ...
2376
+
2377
+ class SegmentSplitInfo(LoadCommand):
2378
+ data_offset: int
2379
+
2380
+ data_size: int
2381
+
2382
+ @property
2383
+ def content(self) -> memoryview: ...
2384
+
2385
+ def __str__(self) -> str: ...
2386
+
2387
+ class SourceVersion(LoadCommand):
2388
+ version: list[int]
2389
+
2390
+ def __str__(self) -> str: ...
2391
+
2392
+ class Stub:
2393
+ def __init__(self, target_info: Stub.target_info_t, address: int, raw_stub: Sequence[int]) -> None: ...
2394
+
2395
+ class target_info_t:
2396
+ @overload
2397
+ def __init__(self) -> None: ...
2398
+
2399
+ @overload
2400
+ def __init__(self, arg0: Header.CPU_TYPE, arg1: int, /) -> None: ...
2401
+
2402
+ arch: lief.MachO.Header.CPU_TYPE
2403
+
2404
+ subtype: int
2405
+
2406
+ @property
2407
+ def address(self) -> int: ...
2408
+
2409
+ @property
2410
+ def raw(self) -> memoryview: ...
2411
+
2412
+ @property
2413
+ def target(self) -> Union[int, lief.lief_errors]: ...
2414
+
2415
+ def __str__(self) -> str: ...
2416
+
2417
+ class SubClient(LoadCommand):
2418
+ client: str
2419
+
2420
+ def __str__(self) -> str: ...
2421
+
2422
+ class SubFramework(LoadCommand):
2423
+ umbrella: str
2424
+
2425
+ def __str__(self) -> str: ...
2426
+
2427
+ class Symbol(lief.Symbol):
2428
+ def __init__(self) -> None: ...
2429
+
2430
+ class CATEGORY(enum.Enum):
2431
+ @staticmethod
2432
+ def from_value(arg: int, /) -> Symbol.CATEGORY: ...
2433
+
2434
+ def __eq__(self, arg, /) -> bool: ...
2435
+
2436
+ def __ne__(self, arg, /) -> bool: ...
2437
+
2438
+ def __int__(self) -> int: ...
2439
+
2440
+ NONE = 0
2441
+
2442
+ LOCAL = 1
2443
+
2444
+ EXTERNAL = 2
2445
+
2446
+ UNDEFINED = 3
2447
+
2448
+ INDIRECT_ABS = 4
2449
+
2450
+ INDIRECT_LOCAL = 5
2451
+
2452
+ INDIRECT_ABS_LOCAL = 6
2453
+
2454
+ class ORIGIN(enum.Enum):
2455
+ @staticmethod
2456
+ def from_value(arg: int, /) -> Symbol.ORIGIN: ...
2457
+
2458
+ def __eq__(self, arg, /) -> bool: ...
2459
+
2460
+ def __ne__(self, arg, /) -> bool: ...
2461
+
2462
+ def __int__(self) -> int: ...
2463
+
2464
+ UNKNOWN = 0
2465
+
2466
+ DYLD_EXPORT = 1
2467
+
2468
+ DYLD_BIND = 2
2469
+
2470
+ LC_SYMTAB = 3
2471
+
2472
+ class TYPE(enum.Enum):
2473
+ @staticmethod
2474
+ def from_value(arg: int, /) -> Symbol.TYPE: ...
2475
+
2476
+ def __eq__(self, arg, /) -> bool: ...
2477
+
2478
+ def __ne__(self, arg, /) -> bool: ...
2479
+
2480
+ def __int__(self) -> int: ...
2481
+
2482
+ UNDEFINED = 0
2483
+
2484
+ ABSOLUTE_SYM = 2
2485
+
2486
+ SECTION = 14
2487
+
2488
+ PREBOUND = 12
2489
+
2490
+ INDIRECT = 10
2491
+
2492
+ @property
2493
+ def demangled_name(self) -> str: ...
2494
+
2495
+ @property
2496
+ def category(self) -> Symbol.CATEGORY: ...
2497
+
2498
+ raw_type: int
2499
+
2500
+ @property
2501
+ def type(self) -> Symbol.TYPE: ...
2502
+
2503
+ numberof_sections: int
2504
+
2505
+ description: int
2506
+
2507
+ @property
2508
+ def has_export_info(self) -> bool: ...
2509
+
2510
+ @property
2511
+ def origin(self) -> Symbol.ORIGIN: ...
2512
+
2513
+ @property
2514
+ def export_info(self) -> ExportInfo: ...
2515
+
2516
+ @property
2517
+ def has_binding_info(self) -> bool: ...
2518
+
2519
+ @property
2520
+ def binding_info(self) -> BindingInfo: ...
2521
+
2522
+ @property
2523
+ def library(self) -> DylibCommand: ...
2524
+
2525
+ @property
2526
+ def is_external(self) -> bool: ...
2527
+
2528
+ @property
2529
+ def library_ordinal(self) -> int: ...
2530
+
2531
+ def __str__(self) -> str: ...
2532
+
2533
+ class SymbolCommand(LoadCommand):
2534
+ def __init__(self) -> None: ...
2535
+
2536
+ symbol_offset: int
2537
+
2538
+ numberof_symbols: int
2539
+
2540
+ strings_offset: int
2541
+
2542
+ strings_size: int
2543
+
2544
+ def __str__(self) -> str: ...
2545
+
2546
+ class ThreadCommand(LoadCommand):
2547
+ def __init__(self, arg0: int, arg1: int, arg2: Header.CPU_TYPE, /) -> None: ...
2548
+
2549
+ flavor: int
2550
+
2551
+ state: memoryview
2552
+
2553
+ count: int
2554
+
2555
+ @property
2556
+ def pc(self) -> int: ...
2557
+
2558
+ architecture: lief.MachO.Header.CPU_TYPE
2559
+
2560
+ def __str__(self) -> str: ...
2561
+
2562
+ class TwoLevelHints(LoadCommand):
2563
+ class it_hints_t:
2564
+ def __getitem__(self, arg: int, /) -> int: ...
2565
+
2566
+ def __len__(self) -> int: ...
2567
+
2568
+ def __iter__(self) -> TwoLevelHints.it_hints_t: ...
2569
+
2570
+ def __next__(self) -> int: ...
2571
+
2572
+ @property
2573
+ def hints(self) -> TwoLevelHints.it_hints_t: ...
2574
+
2575
+ @property
2576
+ def content(self) -> memoryview: ...
2577
+
2578
+ def __str__(self) -> str: ...
2579
+
2580
+ class UUIDCommand(LoadCommand):
2581
+ uuid: list[int]
2582
+
2583
+ def __str__(self) -> str: ...
2584
+
2585
+ class UnknownCommand(LoadCommand):
2586
+ @property
2587
+ def original_command(self) -> int: ...
2588
+
2589
+ def __str__(self) -> str: ...
2590
+
2591
+ class VersionMin(LoadCommand):
2592
+ version: list[int]
2593
+
2594
+ sdk: list[int]
2595
+
2596
+ def __str__(self) -> str: ...
2597
+
2598
+ class X86_64_RELOCATION(enum.Enum):
2599
+ @staticmethod
2600
+ def from_value(arg: int, /) -> X86_64_RELOCATION: ...
2601
+
2602
+ def __eq__(self, arg, /) -> bool: ...
2603
+
2604
+ def __ne__(self, arg, /) -> bool: ...
2605
+
2606
+ def __int__(self) -> int: ...
2607
+
2608
+ UNSIGNED = 0
2609
+
2610
+ SIGNED = 1
2611
+
2612
+ BRANCH = 2
2613
+
2614
+ GOT_LOAD = 3
2615
+
2616
+ GOT = 4
2617
+
2618
+ SUBTRACTOR = 5
2619
+
2620
+ SIGNED_1 = 6
2621
+
2622
+ SIGNED_2 = 7
2623
+
2624
+ SIGNED_4 = 8
2625
+
2626
+ TLV = 9
2627
+
2628
+ class X86_RELOCATION(enum.Enum):
2629
+ @staticmethod
2630
+ def from_value(arg: int, /) -> X86_RELOCATION: ...
2631
+
2632
+ def __eq__(self, arg, /) -> bool: ...
2633
+
2634
+ def __ne__(self, arg, /) -> bool: ...
2635
+
2636
+ def __int__(self) -> int: ...
2637
+
2638
+ VANILLA = 0
2639
+
2640
+ PAIR = 1
2641
+
2642
+ SECTDIFF = 2
2643
+
2644
+ PB_LA_PTR = 3
2645
+
2646
+ LOCAL_SECTDIFF = 4
2647
+
2648
+ TLV = 5
2649
+
2650
+ @overload
2651
+ def check_layout(file: Binary) -> tuple[bool, str]: ...
2652
+
2653
+ @overload
2654
+ def check_layout(file: FatBinary) -> tuple[bool, str]: ...
2655
+
2656
+ def is_64(file: str) -> bool: ...
2657
+
2658
+ def is_fat(file: str) -> bool: ...
2659
+
2660
+ class it_data_in_code_entries:
2661
+ def __getitem__(self, arg: int, /) -> DataCodeEntry: ...
2662
+
2663
+ def __len__(self) -> int: ...
2664
+
2665
+ def __iter__(self) -> it_data_in_code_entries: ...
2666
+
2667
+ def __next__(self) -> DataCodeEntry: ...
2668
+
2669
+ @overload
2670
+ def parse(filename: str, config: ParserConfig = ...) -> Optional[FatBinary]: ...
2671
+
2672
+ @overload
2673
+ def parse(raw: Sequence[int], config: ParserConfig = ...) -> Optional[FatBinary]: ...
2674
+
2675
+ @overload
2676
+ def parse(obj: Union[io.IOBase | os.PathLike], config: ParserConfig = ...) -> Optional[FatBinary]: ...
2677
+
2678
+ def parse_from_memory(address: int, config: ParserConfig = ...) -> Optional[FatBinary]: ...