angr 9.2.146__py3-none-win_amd64.whl → 9.2.148__py3-none-win_amd64.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 angr might be problematic. Click here for more details.

Files changed (67) hide show
  1. angr/__init__.py +1 -1
  2. angr/analyses/analysis.py +3 -11
  3. angr/analyses/bindiff.py +343 -68
  4. angr/analyses/calling_convention/fact_collector.py +5 -4
  5. angr/analyses/calling_convention/utils.py +1 -0
  6. angr/analyses/cfg/cfg_arch_options.py +10 -0
  7. angr/analyses/cfg/cfg_base.py +42 -74
  8. angr/analyses/cfg/cfg_emulated.py +12 -12
  9. angr/analyses/cfg/cfg_fast.py +39 -20
  10. angr/analyses/cfg/cfg_fast_soot.py +3 -3
  11. angr/analyses/decompiler/callsite_maker.py +28 -18
  12. angr/analyses/decompiler/clinic.py +4 -4
  13. angr/analyses/decompiler/condition_processor.py +0 -21
  14. angr/analyses/decompiler/counters/call_counter.py +3 -0
  15. angr/analyses/decompiler/optimization_passes/const_prop_reverter.py +1 -1
  16. angr/analyses/decompiler/peephole_optimizations/remove_redundant_conversions.py +14 -0
  17. angr/analyses/decompiler/structured_codegen/c.py +5 -5
  18. angr/analyses/decompiler/structuring/phoenix.py +11 -3
  19. angr/analyses/deobfuscator/api_obf_finder.py +5 -1
  20. angr/analyses/deobfuscator/api_obf_peephole_optimizer.py +1 -1
  21. angr/analyses/flirt/__init__.py +47 -0
  22. angr/analyses/flirt/consts.py +160 -0
  23. angr/analyses/{flirt.py → flirt/flirt.py} +99 -38
  24. angr/analyses/flirt/flirt_function.py +20 -0
  25. angr/analyses/flirt/flirt_matcher.py +351 -0
  26. angr/analyses/flirt/flirt_module.py +32 -0
  27. angr/analyses/flirt/flirt_node.py +23 -0
  28. angr/analyses/flirt/flirt_sig.py +356 -0
  29. angr/analyses/flirt/flirt_utils.py +31 -0
  30. angr/analyses/forward_analysis/visitors/graph.py +0 -8
  31. angr/analyses/identifier/runner.py +1 -1
  32. angr/analyses/reaching_definitions/function_handler.py +4 -4
  33. angr/analyses/reassembler.py +1 -1
  34. angr/analyses/stack_pointer_tracker.py +35 -1
  35. angr/analyses/static_hooker.py +11 -9
  36. angr/analyses/variable_recovery/engine_ail.py +8 -8
  37. angr/analyses/variable_recovery/engine_base.py +2 -0
  38. angr/block.py +6 -6
  39. angr/calling_conventions.py +74 -23
  40. angr/engines/vex/heavy/concretizers.py +10 -0
  41. angr/exploration_techniques/director.py +1 -1
  42. angr/flirt/__init__.py +15 -44
  43. angr/knowledge_plugins/functions/function.py +42 -39
  44. angr/knowledge_plugins/functions/function_manager.py +9 -0
  45. angr/knowledge_plugins/functions/function_parser.py +9 -1
  46. angr/knowledge_plugins/functions/soot_function.py +1 -1
  47. angr/knowledge_plugins/key_definitions/key_definition_manager.py +1 -1
  48. angr/lib/angr_native.dll +0 -0
  49. angr/procedures/definitions/__init__.py +14 -11
  50. angr/procedures/stubs/format_parser.py +1 -1
  51. angr/project.py +23 -29
  52. angr/protos/cfg_pb2.py +14 -25
  53. angr/protos/function_pb2.py +11 -22
  54. angr/protos/primitives_pb2.py +36 -47
  55. angr/protos/variables_pb2.py +28 -39
  56. angr/protos/xrefs_pb2.py +8 -19
  57. angr/sim_type.py +0 -16
  58. angr/simos/cgc.py +1 -1
  59. angr/simos/linux.py +5 -5
  60. angr/simos/windows.py +5 -5
  61. angr/storage/memory_mixins/paged_memory/paged_memory_mixin.py +1 -1
  62. {angr-9.2.146.dist-info → angr-9.2.148.dist-info}/METADATA +8 -8
  63. {angr-9.2.146.dist-info → angr-9.2.148.dist-info}/RECORD +67 -59
  64. {angr-9.2.146.dist-info → angr-9.2.148.dist-info}/WHEEL +1 -1
  65. {angr-9.2.146.dist-info → angr-9.2.148.dist-info}/entry_points.txt +0 -0
  66. {angr-9.2.146.dist-info → angr-9.2.148.dist-info/licenses}/LICENSE +0 -0
  67. {angr-9.2.146.dist-info → angr-9.2.148.dist-info}/top_level.txt +0 -0
@@ -25,7 +25,7 @@ if TYPE_CHECKING:
25
25
 
26
26
 
27
27
  l = logging.getLogger(name=__name__)
28
- SIM_LIBRARIES: dict[str, SimLibrary] = {}
28
+ SIM_LIBRARIES: dict[str, list[SimLibrary]] = {}
29
29
  SIM_TYPE_COLLECTIONS: dict[str, SimTypeCollection] = {}
30
30
 
31
31
 
@@ -38,8 +38,8 @@ class SimTypeCollection:
38
38
  self.names: list[str] | None = None
39
39
  self.types: dict[str, SimType] = {}
40
40
 
41
- def set_names(self, *names):
42
- self.names = names
41
+ def set_names(self, *names: str):
42
+ self.names = list(names)
43
43
  for name in names:
44
44
  SIM_TYPE_COLLECTIONS[name] = self
45
45
 
@@ -121,7 +121,7 @@ class SimLibrary:
121
121
  o.names = list(self.names)
122
122
  return o
123
123
 
124
- def update(self, other):
124
+ def update(self, other: SimLibrary):
125
125
  """
126
126
  Augment this SimLibrary with the information from another SimLibrary
127
127
 
@@ -147,7 +147,10 @@ class SimLibrary:
147
147
  """
148
148
  for name in names:
149
149
  self.names.append(name)
150
- SIM_LIBRARIES[name] = self
150
+ if name in SIM_LIBRARIES:
151
+ SIM_LIBRARIES[name].append(self)
152
+ else:
153
+ SIM_LIBRARIES[name] = [self]
151
154
 
152
155
  def set_default_cc(self, arch_name, cc_cls):
153
156
  """
@@ -252,7 +255,7 @@ class SimLibrary:
252
255
  proc.guessed_prototype = False
253
256
  if proc.prototype.arg_names is None:
254
257
  # Use inspect to extract the parameters from the run python function
255
- proc.prototype.arg_names = inspect.getfullargspec(proc.run).args[1:]
258
+ proc.prototype.arg_names = tuple(inspect.getfullargspec(proc.run).args[1:])
256
259
  if not proc.ARGS_MISMATCH:
257
260
  proc.num_args = len(proc.prototype.args)
258
261
  if proc.display_name in self.non_returning:
@@ -400,7 +403,6 @@ class SimCppLibrary(SimLibrary):
400
403
  stub.prototype = stub.prototype.with_arch(arch)
401
404
  stub.guessed_prototype = False
402
405
  if not stub.ARGS_MISMATCH:
403
- stub.cc.num_args = len(stub.prototype.args)
404
406
  stub.num_args = len(stub.prototype.args)
405
407
  return stub
406
408
 
@@ -482,9 +484,10 @@ class SimSyscallLibrary(SimLibrary):
482
484
 
483
485
  def update(self, other):
484
486
  super().update(other)
485
- self.syscall_number_mapping.update(other.syscall_number_mapping)
486
- self.syscall_name_mapping.update(other.syscall_name_mapping)
487
- self.default_cc_mapping.update(other.default_cc_mapping)
487
+ if isinstance(other, SimSyscallLibrary):
488
+ self.syscall_number_mapping.update(other.syscall_number_mapping)
489
+ self.syscall_name_mapping.update(other.syscall_name_mapping)
490
+ self.default_cc_mapping.update(other.default_cc_mapping)
488
491
 
489
492
  def minimum_syscall_number(self, abi):
490
493
  """
@@ -523,7 +526,7 @@ class SimSyscallLibrary(SimLibrary):
523
526
  :param mapping: A dict mapping syscall numbers to function names
524
527
  """
525
528
  self.syscall_number_mapping[abi].update(mapping)
526
- self.syscall_name_mapping[abi].update(dict(reversed(i) for i in mapping.items()))
529
+ self.syscall_name_mapping[abi].update({b: a for a, b in mapping.items()})
527
530
 
528
531
  def set_abi_cc(self, abi, cc_cls):
529
532
  """
@@ -164,7 +164,7 @@ class FormatString:
164
164
  negative = claripy.SLT(target_variable, 0)
165
165
 
166
166
  # how many digits does it take to represent this variable fully?
167
- max_digits = int(math.ceil(math.log(2**bits, base)))
167
+ max_digits = math.ceil(math.log(2**bits, base))
168
168
 
169
169
  # how many digits does the format specify?
170
170
  spec_digits = component.length_spec
angr/project.py CHANGED
@@ -14,7 +14,6 @@ from archinfo.arch_soot import SootAddressDescriptor, ArchSoot
14
14
  import cle
15
15
  from .sim_procedure import SimProcedure
16
16
 
17
- from .misc.ux import deprecated
18
17
  from .errors import AngrNoPluginError
19
18
 
20
19
  l = logging.getLogger(name=__name__)
@@ -300,16 +299,17 @@ class Project:
300
299
  missing_libs = []
301
300
  for lib_name in self.loader.missing_dependencies:
302
301
  try:
303
- missing_libs.append(SIM_LIBRARIES[lib_name])
302
+ missing_libs.extend(SIM_LIBRARIES[lib_name])
304
303
  except KeyError:
305
304
  l.info("There are no simprocedures for missing library %s :(", lib_name)
306
305
  # additionally provide libraries we _have_ loaded as a fallback fallback
307
306
  # this helps in the case that e.g. CLE picked up a linux arm libc to satisfy an android arm binary
308
307
  for lib in self.loader.all_objects:
309
308
  if lib.provides is not None and lib.provides in SIM_LIBRARIES:
310
- simlib = SIM_LIBRARIES[lib.provides]
311
- if simlib not in missing_libs:
312
- missing_libs.append(simlib)
309
+ simlibs = SIM_LIBRARIES[lib.provides]
310
+ for simlib in simlibs:
311
+ if simlib not in missing_libs:
312
+ missing_libs.append(simlib)
313
313
 
314
314
  # Step 2: Categorize every "import" symbol in each object.
315
315
  # If it's IGNORED, mark it for stubbing
@@ -362,11 +362,13 @@ class Project:
362
362
  owner_name = owner_name.lower()
363
363
  if owner_name not in SIM_LIBRARIES:
364
364
  continue
365
- sim_lib = SIM_LIBRARIES[owner_name]
366
- if not sim_lib.has_implementation(export.name):
367
- continue
368
- l.info("Using builtin SimProcedure for %s from %s", export.name, sim_lib.name)
369
- self.hook_symbol(export.rebased_addr, sim_lib.get(export.name, sim_proc_arch))
365
+ sim_libs = SIM_LIBRARIES[owner_name]
366
+ for sim_lib in sim_libs:
367
+ if not sim_lib.has_implementation(export.name):
368
+ continue
369
+ l.info("Using builtin SimProcedure for %s from %s", export.name, sim_lib.name)
370
+ self.hook_symbol(export.rebased_addr, sim_lib.get(export.name, sim_proc_arch))
371
+ break
370
372
 
371
373
  # Step 2.3: If 2.2 didn't work, check if the symbol wants to be resolved
372
374
  # by a library we already know something about. Resolve it appropriately.
@@ -375,7 +377,7 @@ class Project:
375
377
  # we still want to try as hard as we can to figure out where it comes from
376
378
  # so we can get the calling convention as close to right as possible.
377
379
  elif reloc.resolvewith is not None and reloc.resolvewith in SIM_LIBRARIES:
378
- sim_lib = SIM_LIBRARIES[reloc.resolvewith]
380
+ sim_lib = sorted(SIM_LIBRARIES[reloc.resolvewith], key=lambda lib: lib.has_prototype(export.name))[-1]
379
381
  if self._check_user_blacklists(export.name):
380
382
  if not func.is_weak:
381
383
  l.info("Using stub SimProcedure for unresolved %s from %s", func.name, sim_lib.name)
@@ -407,7 +409,7 @@ class Project:
407
409
  if export.name and export.name.startswith("_Z"):
408
410
  # GNU C++ name. Use a C++ library to create the stub
409
411
  if "libstdc++.so" in SIM_LIBRARIES:
410
- the_lib = SIM_LIBRARIES["libstdc++.so"]
412
+ the_lib = SIM_LIBRARIES["libstdc++.so"][0]
411
413
  else:
412
414
  l.critical(
413
415
  "Does not find any C++ library in SIM_LIBRARIES. We may not correctly "
@@ -437,16 +439,17 @@ class Project:
437
439
  """
438
440
  # First, filter the SIM_LIBRARIES to a reasonable subset based on the hint
439
441
  if hint == "win":
440
- hinted_libs = filter(lambda lib: lib if lib.endswith(".dll") else None, SIM_LIBRARIES)
442
+ hinted_libs = [lib for lib in SIM_LIBRARIES if lib.endswith(".dll")]
441
443
  else:
442
- hinted_libs = filter(lambda lib: lib if ".so" in lib else None, SIM_LIBRARIES)
444
+ hinted_libs = [lib for lib in SIM_LIBRARIES if ".so" in lib]
443
445
 
444
446
  for lib in hinted_libs:
445
- if SIM_LIBRARIES[lib].has_implementation(f.name):
446
- l.debug("Found implementation for %s in %s", f, lib)
447
- hook_at = f.resolvedby.rebased_addr if f.resolvedby else f.relative_addr # ????
448
- self.hook_symbol(hook_at, (SIM_LIBRARIES[lib].get(f.name, self.arch)))
449
- return True
447
+ for simlib in SIM_LIBRARIES[lib]:
448
+ if simlib.has_implementation(f.name):
449
+ l.debug("Found implementation for %s in %s", f, lib)
450
+ hook_at = f.resolvedby.rebased_addr if f.resolvedby else f.relative_addr # ????
451
+ self.hook_symbol(hook_at, (simlib.get(f.name, self.arch)))
452
+ return True
450
453
 
451
454
  l.debug("Could not find matching SimProcedure for %s, ignoring.", f.name)
452
455
  return False
@@ -826,18 +829,9 @@ class Project:
826
829
  def __repr__(self):
827
830
  return "<Project %s>" % (self.filename if self.filename is not None else "loaded from stream")
828
831
 
829
- #
830
- # Compatibility
831
- #
832
-
833
- @property
834
- @deprecated(replacement="simos")
835
- def _simos(self):
836
- return self.simos
837
-
838
832
 
839
833
  from .factory import AngrObjectFactory
840
- from angr.simos import SimOS, os_mapping
834
+ from .simos import SimOS, os_mapping
841
835
  from .analyses.analysis import AnalysesHub, AnalysesHubWithDefault
842
836
  from .knowledge_base import KnowledgeBase
843
837
  from .procedures import SIM_PROCEDURES, SIM_LIBRARIES
angr/protos/cfg_pb2.py CHANGED
@@ -1,21 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # NO CHECKED-IN PROTOBUF GENCODE
3
2
  # source: angr/protos/cfg.proto
4
- # Protobuf Python Version: 5.28.2
5
3
  """Generated protocol buffer code."""
4
+ from google.protobuf.internal import builder as _builder
6
5
  from google.protobuf import descriptor as _descriptor
7
6
  from google.protobuf import descriptor_pool as _descriptor_pool
8
- from google.protobuf import runtime_version as _runtime_version
9
7
  from google.protobuf import symbol_database as _symbol_database
10
- from google.protobuf.internal import builder as _builder
11
- _runtime_version.ValidateProtobufRuntimeVersion(
12
- _runtime_version.Domain.PUBLIC,
13
- 5,
14
- 28,
15
- 2,
16
- '',
17
- 'angr/protos/cfg.proto'
18
- )
19
8
  # @@protoc_insertion_point(imports)
20
9
 
21
10
  _sym_db = _symbol_database.Default()
@@ -26,17 +15,17 @@ from angr.protos import primitives_pb2 as angr_dot_protos_dot_primitives__pb2
26
15
 
27
16
  DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15\x61ngr/protos/cfg.proto\x12\x0b\x61ngr.protos\x1a\x1c\x61ngr/protos/primitives.proto\"]\n\x07\x43\x46GNode\x12\n\n\x02\x65\x61\x18\x01 \x01(\x04\x12\x0c\n\x04size\x18\x02 \x01(\r\x12\x10\n\x08\x62lock_id\x18\x03 \x03(\x03\x12\x11\n\treturning\x18\x04 \x01(\x08\x12\x13\n\x0binstr_addrs\x18\x05 \x03(\x04\"\x9d\x01\n\x03\x43\x46G\x12\r\n\x05ident\x18\x01 \x01(\t\x12#\n\x05nodes\x18\x02 \x03(\x0b\x32\x14.angr.protos.CFGNode\x12 \n\x05\x65\x64ges\x18\x03 \x03(\x0b\x32\x11.angr.protos.Edge\x12,\n\x0bmemory_data\x18\x04 \x03(\x0b\x32\x17.angr.protos.MemoryData\x12\x12\n\nnormalized\x18\x05 \x01(\x08\"\xfb\x02\n\nMemoryData\x12\n\n\x02\x65\x61\x18\x01 \x01(\x04\x12\x11\n\x04size\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x34\n\x04type\x18\x03 \x01(\x0e\x32&.angr.protos.MemoryData.MemoryDataType\x12\x1b\n\x0ereference_size\x18\x04 \x01(\rH\x01\x88\x01\x01\"\xde\x01\n\x0eMemoryDataType\x12\x13\n\x0fUnknownDataType\x10\x00\x12\x0f\n\x0bUnspecified\x10\x01\x12\x0b\n\x07Integer\x10\x02\x12\x10\n\x0cPointerArray\x10\x03\x12\n\n\x06String\x10\x04\x12\x11\n\rUnicodeString\x10\x05\x12\x13\n\x0fSegmentBoundary\x10\x06\x12\x11\n\rCodeReference\x10\x07\x12\x0f\n\x0bGOTPLTEntry\x10\x08\x12\r\n\tELFHeader\x10\t\x12\x11\n\rFloatingPoint\x10\n\x12\r\n\tAlignment\x10\x0b\x42\x07\n\x05_sizeB\x11\n\x0f_reference_sizeb\x06proto3')
28
17
 
29
- _globals = globals()
30
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'angr.protos.cfg_pb2', _globals)
32
- if not _descriptor._USE_C_DESCRIPTORS:
33
- DESCRIPTOR._loaded_options = None
34
- _globals['_CFGNODE']._serialized_start=68
35
- _globals['_CFGNODE']._serialized_end=161
36
- _globals['_CFG']._serialized_start=164
37
- _globals['_CFG']._serialized_end=321
38
- _globals['_MEMORYDATA']._serialized_start=324
39
- _globals['_MEMORYDATA']._serialized_end=703
40
- _globals['_MEMORYDATA_MEMORYDATATYPE']._serialized_start=453
41
- _globals['_MEMORYDATA_MEMORYDATATYPE']._serialized_end=675
18
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
19
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'angr.protos.cfg_pb2', globals())
20
+ if _descriptor._USE_C_DESCRIPTORS == False:
21
+
22
+ DESCRIPTOR._options = None
23
+ _CFGNODE._serialized_start=68
24
+ _CFGNODE._serialized_end=161
25
+ _CFG._serialized_start=164
26
+ _CFG._serialized_end=321
27
+ _MEMORYDATA._serialized_start=324
28
+ _MEMORYDATA._serialized_end=703
29
+ _MEMORYDATA_MEMORYDATATYPE._serialized_start=453
30
+ _MEMORYDATA_MEMORYDATATYPE._serialized_end=675
42
31
  # @@protoc_insertion_point(module_scope)
@@ -1,21 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # NO CHECKED-IN PROTOBUF GENCODE
3
2
  # source: angr/protos/function.proto
4
- # Protobuf Python Version: 5.28.2
5
3
  """Generated protocol buffer code."""
4
+ from google.protobuf.internal import builder as _builder
6
5
  from google.protobuf import descriptor as _descriptor
7
6
  from google.protobuf import descriptor_pool as _descriptor_pool
8
- from google.protobuf import runtime_version as _runtime_version
9
7
  from google.protobuf import symbol_database as _symbol_database
10
- from google.protobuf.internal import builder as _builder
11
- _runtime_version.ValidateProtobufRuntimeVersion(
12
- _runtime_version.Domain.PUBLIC,
13
- 5,
14
- 28,
15
- 2,
16
- '',
17
- 'angr/protos/function.proto'
18
- )
19
8
  # @@protoc_insertion_point(imports)
20
9
 
21
10
  _sym_db = _symbol_database.Default()
@@ -24,15 +13,15 @@ _sym_db = _symbol_database.Default()
24
13
  from angr.protos import primitives_pb2 as angr_dot_protos_dot_primitives__pb2
25
14
 
26
15
 
27
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1a\x61ngr/protos/function.proto\x12\x0b\x61ngr.protos\x1a\x1c\x61ngr/protos/primitives.proto\"\x99\x03\n\x08\x46unction\x12\n\n\x02\x65\x61\x18\x01 \x01(\x04\x12\x15\n\ris_entrypoint\x18\x03 \x01(\x08\x12\"\n\x06\x62locks\x18\x02 \x03(\x0b\x32\x12.angr.protos.Block\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x0e\n\x06is_plt\x18\x07 \x01(\x08\x12\x12\n\nis_syscall\x18\x08 \x01(\x08\x12\x17\n\x0fis_simprocedure\x18\t \x01(\x08\x12\x11\n\treturning\x18\n \x01(\x08\x12\x13\n\x0b\x62inary_name\x18\x0b \x01(\t\x12&\n\x05graph\x18\x0c \x01(\x0b\x32\x17.angr.protos.BlockGraph\x12\x1a\n\x12\x65xternal_functions\x18\r \x03(\x04\x12\x11\n\talignment\x18\x0e \x01(\x08\x12\x12\n\nnormalized\x18\x0f \x01(\x08\x12;\n\x0cmatched_from\x18\x10 \x01(\x0e\x32%.angr.protos.Function.SignatureSource\"+\n\x0fSignatureSource\x12\r\n\tUNMATCHED\x10\x00\x12\t\n\x05\x46LIRT\x10\x01\x62\x06proto3')
16
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1a\x61ngr/protos/function.proto\x12\x0b\x61ngr.protos\x1a\x1c\x61ngr/protos/primitives.proto\"\x81\x04\n\x08\x46unction\x12\n\n\x02\x65\x61\x18\x01 \x01(\x04\x12\x15\n\ris_entrypoint\x18\x03 \x01(\x08\x12\"\n\x06\x62locks\x18\x02 \x03(\x0b\x32\x12.angr.protos.Block\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x0e\n\x06is_plt\x18\x07 \x01(\x08\x12\x12\n\nis_syscall\x18\x08 \x01(\x08\x12\x17\n\x0fis_simprocedure\x18\t \x01(\x08\x12\x11\n\treturning\x18\n \x01(\x08\x12\x13\n\x0b\x62inary_name\x18\x0b \x01(\t\x12&\n\x05graph\x18\x0c \x01(\x0b\x32\x17.angr.protos.BlockGraph\x12\x1a\n\x12\x65xternal_functions\x18\r \x03(\x04\x12\x11\n\talignment\x18\x0e \x01(\x08\x12\x12\n\nnormalized\x18\x0f \x01(\x08\x12;\n\x0cmatched_from\x18\x10 \x01(\x0e\x32%.angr.protos.Function.SignatureSource\x12\x11\n\tprototype\x18\x11 \x01(\x0c\x12\x1a\n\x12\x63\x61lling_convention\x18\x12 \x01(\x0c\x12\x19\n\x11prototype_libname\x18\x13 \x01(\t\x12\x1c\n\x14is_prototype_guessed\x18\x14 \x01(\x08\"+\n\x0fSignatureSource\x12\r\n\tUNMATCHED\x10\x00\x12\t\n\x05\x46LIRT\x10\x01\x62\x06proto3')
17
+
18
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
19
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'angr.protos.function_pb2', globals())
20
+ if _descriptor._USE_C_DESCRIPTORS == False:
28
21
 
29
- _globals = globals()
30
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'angr.protos.function_pb2', _globals)
32
- if not _descriptor._USE_C_DESCRIPTORS:
33
- DESCRIPTOR._loaded_options = None
34
- _globals['_FUNCTION']._serialized_start=74
35
- _globals['_FUNCTION']._serialized_end=483
36
- _globals['_FUNCTION_SIGNATURESOURCE']._serialized_start=440
37
- _globals['_FUNCTION_SIGNATURESOURCE']._serialized_end=483
22
+ DESCRIPTOR._options = None
23
+ _FUNCTION._serialized_start=74
24
+ _FUNCTION._serialized_end=587
25
+ _FUNCTION_SIGNATURESOURCE._serialized_start=544
26
+ _FUNCTION_SIGNATURESOURCE._serialized_end=587
38
27
  # @@protoc_insertion_point(module_scope)
@@ -1,21 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # NO CHECKED-IN PROTOBUF GENCODE
3
2
  # source: angr/protos/primitives.proto
4
- # Protobuf Python Version: 5.28.2
5
3
  """Generated protocol buffer code."""
4
+ from google.protobuf.internal import builder as _builder
6
5
  from google.protobuf import descriptor as _descriptor
7
6
  from google.protobuf import descriptor_pool as _descriptor_pool
8
- from google.protobuf import runtime_version as _runtime_version
9
7
  from google.protobuf import symbol_database as _symbol_database
10
- from google.protobuf.internal import builder as _builder
11
- _runtime_version.ValidateProtobufRuntimeVersion(
12
- _runtime_version.Domain.PUBLIC,
13
- 5,
14
- 28,
15
- 2,
16
- '',
17
- 'angr/protos/primitives.proto'
18
- )
19
8
  # @@protoc_insertion_point(imports)
20
9
 
21
10
  _sym_db = _symbol_database.Default()
@@ -25,39 +14,39 @@ _sym_db = _symbol_database.Default()
25
14
 
26
15
  DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x61ngr/protos/primitives.proto\x12\x0b\x61ngr.protos\"\x87\x05\n\rCodeReference\x12:\n\x0btarget_type\x18\x01 \x01(\x0e\x32%.angr.protos.CodeReference.TargetType\x12<\n\x0coperand_type\x18\x02 \x01(\x0e\x32&.angr.protos.CodeReference.OperandType\x12\x35\n\x08location\x18\x03 \x01(\x0e\x32#.angr.protos.CodeReference.Location\x12\n\n\x02\x65\x61\x18\x04 \x01(\x04\x12\x0c\n\x04mask\x18\x05 \x01(\x04\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x0f\n\x07\x64\x61ta_ea\x18\x07 \x01(\x04\x12\x10\n\x08\x62lock_ea\x18\x08 \x01(\x04\x12\x10\n\x08stmt_idx\x18\t \x01(\x05\x12\x13\n\x0boperand_idx\x18\n \x01(\x05\x12:\n\x08ref_type\x18\x0b \x01(\x0e\x32(.angr.protos.CodeReference.ReferenceType\"=\n\nTargetType\x12\x0e\n\nCodeTarget\x10\x00\x12\x0e\n\nDataTarget\x10\x01\x12\x0f\n\x0bStackTarget\x10\x02\"~\n\x0bOperandType\x12\x14\n\x10ImmediateOperand\x10\x00\x12\x11\n\rMemoryOperand\x10\x01\x12\x1d\n\x19MemoryDisplacementOperand\x10\x02\x12\x16\n\x12\x43ontrolFlowOperand\x10\x03\x12\x0f\n\x0bOffsetTable\x10\x04\"&\n\x08Location\x12\x0c\n\x08Internal\x10\x00\x12\x0c\n\x08\x45xternal\x10\x01\"0\n\rReferenceType\x12\n\n\x06offset\x10\x00\x12\x08\n\x04read\x10\x01\x12\t\n\x05write\x10\x02\"k\n\x0bInstruction\x12\n\n\x02\x65\x61\x18\x01 \x01(\x04\x12\r\n\x05\x62ytes\x18\x02 \x01(\x0c\x12)\n\x05xrefs\x18\x03 \x01(\x0b\x32\x1a.angr.protos.CodeReference\x12\x16\n\x0elocal_noreturn\x18\x04 \x01(\x08\"`\n\x05\x42lock\x12\n\n\x02\x65\x61\x18\x01 \x01(\x04\x12.\n\x0cinstructions\x18\x02 \x01(\x0b\x32\x18.angr.protos.Instruction\x12\x0c\n\x04size\x18\x04 \x01(\r\x12\r\n\x05\x62ytes\x18\x05 \x01(\x0c\"\x95\x02\n\x10\x45xternalFunction\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\n\n\x02\x65\x61\x18\x02 \x01(\x04\x12;\n\x02\x63\x63\x18\x03 \x01(\x0e\x32/.angr.protos.ExternalFunction.CallingConvention\x12\x12\n\nhas_return\x18\x04 \x01(\x08\x12\x11\n\tno_return\x18\x05 \x01(\x08\x12\x16\n\x0e\x61rgument_count\x18\x06 \x01(\x05\x12\x0f\n\x07is_weak\x18\x07 \x01(\x08\x12\x11\n\tprototype\x18\x08 \x01(\t\"G\n\x11\x43\x61llingConvention\x12\x11\n\rCallerCleanup\x10\x00\x12\x11\n\rCalleeCleanup\x10\x01\x12\x0c\n\x08\x46\x61stCall\x10\x02\"d\n\x10\x45xternalVariable\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\n\n\x02\x65\x61\x18\x02 \x01(\x04\x12\x0c\n\x04size\x18\x03 \x01(\r\x12\x0f\n\x07is_weak\x18\x04 \x01(\x08\x12\x17\n\x0fis_thread_local\x18\x05 \x01(\x08\"\xdf\x05\n\x04\x45\x64ge\x12\x0e\n\x06src_ea\x18\x01 \x01(\x04\x12\x0e\n\x06\x64st_ea\x18\x02 \x01(\x04\x12,\n\x08jumpkind\x18\x03 \x01(\x0e\x32\x1a.angr.protos.Edge.JumpKind\x12\x12\n\nis_outside\x18\x04 \x01(\x08\x12\x10\n\x08ins_addr\x18\x05 \x01(\x04\x12\x10\n\x08stmt_idx\x18\x06 \x01(\x03\x12)\n\x04\x64\x61ta\x18\x07 \x03(\x0b\x32\x1b.angr.protos.Edge.DataEntry\x1a+\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\"\xf8\x03\n\x08JumpKind\x12\x13\n\x0fUnknownJumpkind\x10\x00\x12\n\n\x06\x42oring\x10\x01\x12\x08\n\x04\x43\x61ll\x10\x02\x12\n\n\x06Return\x10\x03\x12\x0e\n\nFakeReturn\x10\x04\x12\x0b\n\x07Syscall\x10\x05\x12\x0f\n\x0bSys_syscall\x10\x06\x12\x0e\n\nSys_int128\x10\x07\x12\x0c\n\x08NoDecode\x10\x08\x12\n\n\x06\x45mWarn\x10\t\x12\x11\n\rSigFPE_IntDiv\x10\n\x12\x0b\n\x07SigTRAP\x10\x0b\x12\x0b\n\x07SigSEGV\x10\x0c\x12\x0b\n\x07MapFail\x10\r\x12\x0b\n\x07NoRedir\x10\x0e\x12\r\n\tClientReq\x10\x0f\x12\r\n\tException\x10\x10\x12\n\n\x06_8jzf8\x10\x11\x12\n\n\x06\x45mFail\x10\x12\x12\x0f\n\x0b\x46lushDCache\x10\x13\x12\x0f\n\x0bInvalICache\x10\x14\x12\x0e\n\nPrivileged\x10\x15\x12\n\n\x06SigBUS\x10\x16\x12\x11\n\rSigFPE_IntOvf\x10\x17\x12\n\n\x06SigILL\x10\x18\x12\x0e\n\nSys_int129\x10\x19\x12\x0e\n\nSys_int130\x10\x1a\x12\x0e\n\nSys_int145\x10\x1b\x12\x0e\n\nSys_int210\x10\x1c\x12\r\n\tSys_int32\x10\x1d\x12\x10\n\x0cSys_sysenter\x10\x1e\x12\t\n\x05Yield\x10\x1f\x12\n\n\x06SigFPE\x10 \x12\x0b\n\x07Sys_int\x10!\".\n\nBlockGraph\x12 \n\x05\x65\x64ges\x18\x01 \x03(\x0b\x32\x11.angr.protos.Edgeb\x06proto3')
27
16
 
28
- _globals = globals()
29
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
30
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'angr.protos.primitives_pb2', _globals)
31
- if not _descriptor._USE_C_DESCRIPTORS:
32
- DESCRIPTOR._loaded_options = None
33
- _globals['_EDGE_DATAENTRY']._loaded_options = None
34
- _globals['_EDGE_DATAENTRY']._serialized_options = b'8\001'
35
- _globals['_CODEREFERENCE']._serialized_start=46
36
- _globals['_CODEREFERENCE']._serialized_end=693
37
- _globals['_CODEREFERENCE_TARGETTYPE']._serialized_start=414
38
- _globals['_CODEREFERENCE_TARGETTYPE']._serialized_end=475
39
- _globals['_CODEREFERENCE_OPERANDTYPE']._serialized_start=477
40
- _globals['_CODEREFERENCE_OPERANDTYPE']._serialized_end=603
41
- _globals['_CODEREFERENCE_LOCATION']._serialized_start=605
42
- _globals['_CODEREFERENCE_LOCATION']._serialized_end=643
43
- _globals['_CODEREFERENCE_REFERENCETYPE']._serialized_start=645
44
- _globals['_CODEREFERENCE_REFERENCETYPE']._serialized_end=693
45
- _globals['_INSTRUCTION']._serialized_start=695
46
- _globals['_INSTRUCTION']._serialized_end=802
47
- _globals['_BLOCK']._serialized_start=804
48
- _globals['_BLOCK']._serialized_end=900
49
- _globals['_EXTERNALFUNCTION']._serialized_start=903
50
- _globals['_EXTERNALFUNCTION']._serialized_end=1180
51
- _globals['_EXTERNALFUNCTION_CALLINGCONVENTION']._serialized_start=1109
52
- _globals['_EXTERNALFUNCTION_CALLINGCONVENTION']._serialized_end=1180
53
- _globals['_EXTERNALVARIABLE']._serialized_start=1182
54
- _globals['_EXTERNALVARIABLE']._serialized_end=1282
55
- _globals['_EDGE']._serialized_start=1285
56
- _globals['_EDGE']._serialized_end=2020
57
- _globals['_EDGE_DATAENTRY']._serialized_start=1470
58
- _globals['_EDGE_DATAENTRY']._serialized_end=1513
59
- _globals['_EDGE_JUMPKIND']._serialized_start=1516
60
- _globals['_EDGE_JUMPKIND']._serialized_end=2020
61
- _globals['_BLOCKGRAPH']._serialized_start=2022
62
- _globals['_BLOCKGRAPH']._serialized_end=2068
17
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
18
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'angr.protos.primitives_pb2', globals())
19
+ if _descriptor._USE_C_DESCRIPTORS == False:
20
+
21
+ DESCRIPTOR._options = None
22
+ _EDGE_DATAENTRY._options = None
23
+ _EDGE_DATAENTRY._serialized_options = b'8\001'
24
+ _CODEREFERENCE._serialized_start=46
25
+ _CODEREFERENCE._serialized_end=693
26
+ _CODEREFERENCE_TARGETTYPE._serialized_start=414
27
+ _CODEREFERENCE_TARGETTYPE._serialized_end=475
28
+ _CODEREFERENCE_OPERANDTYPE._serialized_start=477
29
+ _CODEREFERENCE_OPERANDTYPE._serialized_end=603
30
+ _CODEREFERENCE_LOCATION._serialized_start=605
31
+ _CODEREFERENCE_LOCATION._serialized_end=643
32
+ _CODEREFERENCE_REFERENCETYPE._serialized_start=645
33
+ _CODEREFERENCE_REFERENCETYPE._serialized_end=693
34
+ _INSTRUCTION._serialized_start=695
35
+ _INSTRUCTION._serialized_end=802
36
+ _BLOCK._serialized_start=804
37
+ _BLOCK._serialized_end=900
38
+ _EXTERNALFUNCTION._serialized_start=903
39
+ _EXTERNALFUNCTION._serialized_end=1180
40
+ _EXTERNALFUNCTION_CALLINGCONVENTION._serialized_start=1109
41
+ _EXTERNALFUNCTION_CALLINGCONVENTION._serialized_end=1180
42
+ _EXTERNALVARIABLE._serialized_start=1182
43
+ _EXTERNALVARIABLE._serialized_end=1282
44
+ _EDGE._serialized_start=1285
45
+ _EDGE._serialized_end=2020
46
+ _EDGE_DATAENTRY._serialized_start=1470
47
+ _EDGE_DATAENTRY._serialized_end=1513
48
+ _EDGE_JUMPKIND._serialized_start=1516
49
+ _EDGE_JUMPKIND._serialized_end=2020
50
+ _BLOCKGRAPH._serialized_start=2022
51
+ _BLOCKGRAPH._serialized_end=2068
63
52
  # @@protoc_insertion_point(module_scope)
@@ -1,21 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # NO CHECKED-IN PROTOBUF GENCODE
3
2
  # source: angr/protos/variables.proto
4
- # Protobuf Python Version: 5.28.2
5
3
  """Generated protocol buffer code."""
4
+ from google.protobuf.internal import builder as _builder
6
5
  from google.protobuf import descriptor as _descriptor
7
6
  from google.protobuf import descriptor_pool as _descriptor_pool
8
- from google.protobuf import runtime_version as _runtime_version
9
7
  from google.protobuf import symbol_database as _symbol_database
10
- from google.protobuf.internal import builder as _builder
11
- _runtime_version.ValidateProtobufRuntimeVersion(
12
- _runtime_version.Domain.PUBLIC,
13
- 5,
14
- 28,
15
- 2,
16
- '',
17
- 'angr/protos/variables.proto'
18
- )
19
8
  # @@protoc_insertion_point(imports)
20
9
 
21
10
  _sym_db = _symbol_database.Default()
@@ -25,31 +14,31 @@ _sym_db = _symbol_database.Default()
25
14
 
26
15
  DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1b\x61ngr/protos/variables.proto\x12\x0b\x61ngr.protos\"\x90\x01\n\x0cVariableBase\x12\r\n\x05ident\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x06region\x18\x03 \x01(\x04H\x00\x88\x01\x01\x12\x15\n\x08\x63\x61tegory\x18\x04 \x01(\tH\x01\x88\x01\x01\x12\x0f\n\x07renamed\x18\x05 \x01(\x08\x12\x0e\n\x06is_phi\x18\x06 \x01(\x08\x42\t\n\x07_regionB\x0b\n\t_category\"L\n\x11TemporaryVariable\x12\'\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x19.angr.protos.VariableBase\x12\x0e\n\x06tmp_id\x18\x02 \x01(\r\"V\n\x10RegisterVariable\x12\'\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x19.angr.protos.VariableBase\x12\x0b\n\x03reg\x18\x02 \x01(\r\x12\x0c\n\x04size\x18\x03 \x01(\r\"U\n\x0eMemoryVariable\x12\'\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x19.angr.protos.VariableBase\x12\x0c\n\x04\x61\x64\x64r\x18\x02 \x01(\x04\x12\x0c\n\x04size\x18\x03 \x01(\r\"u\n\rStackVariable\x12\'\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x19.angr.protos.VariableBase\x12\x0c\n\x04\x61\x64\x64r\x18\x02 \x01(\x04\x12\x0c\n\x04size\x18\x03 \x01(\r\x12\x0f\n\x07sp_base\x18\x04 \x01(\x08\x12\x0e\n\x06offset\x18\x05 \x01(\x05\"\x9c\x02\n\x0eVariableAccess\x12\r\n\x05ident\x18\x01 \x01(\t\x12\x12\n\nblock_addr\x18\x02 \x01(\x04\x12\x10\n\x08stmt_idx\x18\x03 \x01(\x05\x12\x10\n\x08ins_addr\x18\x04 \x01(\x04\x12\x13\n\x06offset\x18\x05 \x01(\x03H\x00\x88\x01\x01\x12\x43\n\x0b\x61\x63\x63\x65ss_type\x18\x06 \x01(\x0e\x32..angr.protos.VariableAccess.VariableAccessSort\x12\x16\n\tatom_hash\x18\x07 \x01(\rH\x01\x88\x01\x01\"8\n\x12VariableAccessSort\x12\t\n\x05WRITE\x10\x00\x12\x08\n\x04READ\x10\x01\x12\r\n\tREFERENCE\x10\x02\x42\t\n\x07_offsetB\x0c\n\n_atom_hash\"/\n\x0cVariableType\x12\r\n\x05ident\x18\x01 \x01(\t\x12\x10\n\x08var_type\x18\x02 \x01(\t\";\n\x0bVar2Unified\x12\x11\n\tvar_ident\x18\x01 \x01(\t\x12\x19\n\x11unified_var_ident\x18\x02 \x01(\t\"/\n\x07Phi2Var\x12\x11\n\tphi_ident\x18\x01 \x01(\t\x12\x11\n\tvar_ident\x18\x02 \x01(\t\"\xe6\x04\n\x17VariableManagerInternal\x12\x30\n\x08tempvars\x18\x01 \x03(\x0b\x32\x1e.angr.protos.TemporaryVariable\x12.\n\x07regvars\x18\x02 \x03(\x0b\x32\x1d.angr.protos.RegisterVariable\x12,\n\x07memvars\x18\x03 \x03(\x0b\x32\x1b.angr.protos.MemoryVariable\x12-\n\tstackvars\x18\x04 \x03(\x0b\x32\x1a.angr.protos.StackVariable\x12-\n\x08\x61\x63\x63\x65sses\x18\x05 \x03(\x0b\x32\x1b.angr.protos.VariableAccess\x12\x38\n\x10unified_tempvars\x18\x06 \x03(\x0b\x32\x1e.angr.protos.TemporaryVariable\x12\x36\n\x0funified_regvars\x18\x07 \x03(\x0b\x32\x1d.angr.protos.RegisterVariable\x12\x34\n\x0funified_memvars\x18\x08 \x03(\x0b\x32\x1b.angr.protos.MemoryVariable\x12\x35\n\x11unified_stackvars\x18\t \x03(\x0b\x32\x1a.angr.protos.StackVariable\x12-\n\x0bvar2unified\x18\n \x03(\x0b\x32\x18.angr.protos.Var2Unified\x12(\n\x05types\x18\x0b \x03(\x0b\x32\x19.angr.protos.VariableType\x12%\n\x07phi2var\x18\x0c \x03(\x0b\x32\x14.angr.protos.Phi2Varb\x06proto3')
27
16
 
28
- _globals = globals()
29
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
30
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'angr.protos.variables_pb2', _globals)
31
- if not _descriptor._USE_C_DESCRIPTORS:
32
- DESCRIPTOR._loaded_options = None
33
- _globals['_VARIABLEBASE']._serialized_start=45
34
- _globals['_VARIABLEBASE']._serialized_end=189
35
- _globals['_TEMPORARYVARIABLE']._serialized_start=191
36
- _globals['_TEMPORARYVARIABLE']._serialized_end=267
37
- _globals['_REGISTERVARIABLE']._serialized_start=269
38
- _globals['_REGISTERVARIABLE']._serialized_end=355
39
- _globals['_MEMORYVARIABLE']._serialized_start=357
40
- _globals['_MEMORYVARIABLE']._serialized_end=442
41
- _globals['_STACKVARIABLE']._serialized_start=444
42
- _globals['_STACKVARIABLE']._serialized_end=561
43
- _globals['_VARIABLEACCESS']._serialized_start=564
44
- _globals['_VARIABLEACCESS']._serialized_end=848
45
- _globals['_VARIABLEACCESS_VARIABLEACCESSSORT']._serialized_start=767
46
- _globals['_VARIABLEACCESS_VARIABLEACCESSSORT']._serialized_end=823
47
- _globals['_VARIABLETYPE']._serialized_start=850
48
- _globals['_VARIABLETYPE']._serialized_end=897
49
- _globals['_VAR2UNIFIED']._serialized_start=899
50
- _globals['_VAR2UNIFIED']._serialized_end=958
51
- _globals['_PHI2VAR']._serialized_start=960
52
- _globals['_PHI2VAR']._serialized_end=1007
53
- _globals['_VARIABLEMANAGERINTERNAL']._serialized_start=1010
54
- _globals['_VARIABLEMANAGERINTERNAL']._serialized_end=1624
17
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
18
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'angr.protos.variables_pb2', globals())
19
+ if _descriptor._USE_C_DESCRIPTORS == False:
20
+
21
+ DESCRIPTOR._options = None
22
+ _VARIABLEBASE._serialized_start=45
23
+ _VARIABLEBASE._serialized_end=189
24
+ _TEMPORARYVARIABLE._serialized_start=191
25
+ _TEMPORARYVARIABLE._serialized_end=267
26
+ _REGISTERVARIABLE._serialized_start=269
27
+ _REGISTERVARIABLE._serialized_end=355
28
+ _MEMORYVARIABLE._serialized_start=357
29
+ _MEMORYVARIABLE._serialized_end=442
30
+ _STACKVARIABLE._serialized_start=444
31
+ _STACKVARIABLE._serialized_end=561
32
+ _VARIABLEACCESS._serialized_start=564
33
+ _VARIABLEACCESS._serialized_end=848
34
+ _VARIABLEACCESS_VARIABLEACCESSSORT._serialized_start=767
35
+ _VARIABLEACCESS_VARIABLEACCESSSORT._serialized_end=823
36
+ _VARIABLETYPE._serialized_start=850
37
+ _VARIABLETYPE._serialized_end=897
38
+ _VAR2UNIFIED._serialized_start=899
39
+ _VAR2UNIFIED._serialized_end=958
40
+ _PHI2VAR._serialized_start=960
41
+ _PHI2VAR._serialized_end=1007
42
+ _VARIABLEMANAGERINTERNAL._serialized_start=1010
43
+ _VARIABLEMANAGERINTERNAL._serialized_end=1624
55
44
  # @@protoc_insertion_point(module_scope)
angr/protos/xrefs_pb2.py CHANGED
@@ -1,21 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # NO CHECKED-IN PROTOBUF GENCODE
3
2
  # source: angr/protos/xrefs.proto
4
- # Protobuf Python Version: 5.28.2
5
3
  """Generated protocol buffer code."""
4
+ from google.protobuf.internal import builder as _builder
6
5
  from google.protobuf import descriptor as _descriptor
7
6
  from google.protobuf import descriptor_pool as _descriptor_pool
8
- from google.protobuf import runtime_version as _runtime_version
9
7
  from google.protobuf import symbol_database as _symbol_database
10
- from google.protobuf.internal import builder as _builder
11
- _runtime_version.ValidateProtobufRuntimeVersion(
12
- _runtime_version.Domain.PUBLIC,
13
- 5,
14
- 28,
15
- 2,
16
- '',
17
- 'angr/protos/xrefs.proto'
18
- )
19
8
  # @@protoc_insertion_point(imports)
20
9
 
21
10
  _sym_db = _symbol_database.Default()
@@ -26,11 +15,11 @@ from angr.protos import primitives_pb2 as angr_dot_protos_dot_primitives__pb2
26
15
 
27
16
  DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17\x61ngr/protos/xrefs.proto\x12\x0b\x61ngr.protos\x1a\x1c\x61ngr/protos/primitives.proto\"2\n\x05XRefs\x12)\n\x05xrefs\x18\x01 \x03(\x0b\x32\x1a.angr.protos.CodeReferenceb\x06proto3')
28
17
 
29
- _globals = globals()
30
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'angr.protos.xrefs_pb2', _globals)
32
- if not _descriptor._USE_C_DESCRIPTORS:
33
- DESCRIPTOR._loaded_options = None
34
- _globals['_XREFS']._serialized_start=70
35
- _globals['_XREFS']._serialized_end=120
18
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
19
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'angr.protos.xrefs_pb2', globals())
20
+ if _descriptor._USE_C_DESCRIPTORS == False:
21
+
22
+ DESCRIPTOR._options = None
23
+ _XREFS._serialized_start=70
24
+ _XREFS._serialized_end=120
36
25
  # @@protoc_insertion_point(module_scope)
angr/sim_type.py CHANGED
@@ -16,7 +16,6 @@ import pycparser
16
16
 
17
17
  from angr.errors import AngrMissingTypeError, AngrTypeError
18
18
  from angr.sim_state import SimState
19
- from .misc.ux import deprecated
20
19
 
21
20
  if TYPE_CHECKING:
22
21
  from angr.procedures.definitions import SimTypeCollection
@@ -2997,21 +2996,6 @@ def _make_scope(predefined_types=None):
2997
2996
  return [scope]
2998
2997
 
2999
2998
 
3000
- @deprecated(replacement="register_types(parse_type(struct_expr))")
3001
- def define_struct(defn):
3002
- """
3003
- Register a struct definition globally
3004
-
3005
- >>> define_struct('struct abcd {int x; int y;}')
3006
- """
3007
- struct = parse_type(defn)
3008
- if not isinstance(struct, SimStruct):
3009
- raise AngrTypeError("Passed a non-struct type to define_struct")
3010
- ALL_TYPES[struct.name] = struct
3011
- ALL_TYPES["struct " + struct.name] = struct
3012
- return struct
3013
-
3014
-
3015
2999
  def register_types(types):
3016
3000
  """
3017
3001
  Pass in some types and they will be registered to the global type store.
angr/simos/cgc.py CHANGED
@@ -18,7 +18,7 @@ class SimCGC(SimUserland):
18
18
  """
19
19
 
20
20
  def __init__(self, project, **kwargs):
21
- super().__init__(project, syscall_library=L["cgcabi"], syscall_addr_alignment=1, name="CGC", **kwargs)
21
+ super().__init__(project, syscall_library=L["cgcabi"][0], syscall_addr_alignment=1, name="CGC", **kwargs)
22
22
 
23
23
  # pylint: disable=arguments-differ
24
24
  def state_blank(self, flag_page=None, allocate_stack_page_count=0x100, **kwargs):
angr/simos/linux.py CHANGED
@@ -29,7 +29,7 @@ class SimLinux(SimUserland):
29
29
  def __init__(self, project, **kwargs):
30
30
  super().__init__(
31
31
  project,
32
- syscall_library=L["linux"],
32
+ syscall_library=L["linux"][0],
33
33
  syscall_addr_alignment=project.arch.instruction_alignment,
34
34
  name="Linux",
35
35
  **kwargs,
@@ -66,12 +66,12 @@ class SimLinux(SimUserland):
66
66
  self.project.hook(self.vsyscall_addr, P["linux_kernel"]["_vsyscall"]())
67
67
 
68
68
  # there are some functions we MUST use the simprocedures for, regardless of what the user wants
69
- self._weak_hook_symbol("__tls_get_addr", L["ld.so"].get("__tls_get_addr", self.arch)) # ld
70
- self._weak_hook_symbol("___tls_get_addr", L["ld.so"].get("___tls_get_addr", self.arch)) # ld
69
+ self._weak_hook_symbol("__tls_get_addr", L["ld.so"][0].get("__tls_get_addr", self.arch)) # ld
70
+ self._weak_hook_symbol("___tls_get_addr", L["ld.so"][0].get("___tls_get_addr", self.arch)) # ld
71
71
  self._weak_hook_symbol(
72
- "_dl_get_tls_static_info", L["ld.so"].get("_dl_get_tls_static_info", self.arch)
72
+ "_dl_get_tls_static_info", L["ld.so"][0].get("_dl_get_tls_static_info", self.arch)
73
73
  ) # ld
74
- self._weak_hook_symbol("_dl_vdso_vsym", L["libc.so.6"].get("_dl_vdso_vsym", self.arch)) # libc
74
+ self._weak_hook_symbol("_dl_vdso_vsym", L["libc.so.6"][0].get("_dl_vdso_vsym", self.arch)) # libc
75
75
 
76
76
  # set up some static data in the loader object...
77
77
  _rtld_global = self.project.loader.find_symbol("_rtld_global")
angr/simos/windows.py CHANGED
@@ -51,7 +51,7 @@ class SimWindows(SimOS):
51
51
  self.acmdln_ptr = None
52
52
  self.wcmdln_ptr = None
53
53
 
54
- self.fastfail = L["ntoskrnl.exe"].get("__fastfail", self.arch)
54
+ self.fastfail = L["ntoskrnl.exe"][0].get("__fastfail", self.arch)
55
55
  self.fastfail.addr = self._find_or_make(self.fastfail.display_name)
56
56
  self.fastfail.cc = SYSCALL_CC[self.arch.name]["Win32"](self.arch)
57
57
  self._syscall_handlers = {self.fastfail.addr: self.fastfail}
@@ -60,13 +60,13 @@ class SimWindows(SimOS):
60
60
  super().configure_project()
61
61
 
62
62
  # here are some symbols which we MUST hook, regardless of what the user wants
63
- self._weak_hook_symbol("GetProcAddress", L["kernel32.dll"].get("GetProcAddress", self.arch))
64
- self._weak_hook_symbol("LoadLibraryA", L["kernel32.dll"].get("LoadLibraryA", self.arch))
65
- self._weak_hook_symbol("LoadLibraryExW", L["kernel32.dll"].get("LoadLibraryExW", self.arch))
63
+ self._weak_hook_symbol("GetProcAddress", L["kernel32.dll"][0].get("GetProcAddress", self.arch))
64
+ self._weak_hook_symbol("LoadLibraryA", L["kernel32.dll"][0].get("LoadLibraryA", self.arch))
65
+ self._weak_hook_symbol("LoadLibraryExW", L["kernel32.dll"][0].get("LoadLibraryExW", self.arch))
66
66
 
67
67
  self._exception_handler = self._find_or_make("KiUserExceptionDispatcher")
68
68
  self.project.hook(
69
- self._exception_handler, L["ntdll.dll"].get("KiUserExceptionDispatcher", self.arch), replace=True
69
+ self._exception_handler, L["ntdll.dll"][0].get("KiUserExceptionDispatcher", self.arch), replace=True
70
70
  )
71
71
 
72
72
  self.fmode_ptr = self._find_or_make("_fmode")