angr 9.2.135__py3-none-macosx_11_0_arm64.whl → 9.2.136__py3-none-macosx_11_0_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 angr might be problematic. Click here for more details.
- angr/__init__.py +1 -1
- angr/analyses/__init__.py +3 -7
- angr/analyses/analysis.py +4 -0
- angr/analyses/backward_slice.py +1 -2
- angr/analyses/binary_optimizer.py +3 -4
- angr/analyses/bindiff.py +4 -6
- angr/analyses/boyscout.py +1 -3
- angr/analyses/callee_cleanup_finder.py +4 -4
- angr/analyses/calling_convention/calling_convention.py +4 -3
- angr/analyses/calling_convention/fact_collector.py +0 -1
- angr/analyses/cdg.py +1 -2
- angr/analyses/cfg/cfb.py +1 -3
- angr/analyses/cfg/cfg.py +2 -2
- angr/analyses/cfg/cfg_base.py +37 -35
- angr/analyses/cfg/cfg_emulated.py +1 -1
- angr/analyses/cfg/cfg_fast.py +62 -15
- angr/analyses/cfg/cfg_fast_soot.py +1 -1
- angr/analyses/cfg/indirect_jump_resolvers/__init__.py +2 -0
- angr/analyses/cfg/indirect_jump_resolvers/const_resolver.py +46 -10
- angr/analyses/cfg/indirect_jump_resolvers/default_resolvers.py +5 -1
- angr/analyses/cfg/indirect_jump_resolvers/jumptable.py +50 -14
- angr/analyses/cfg/indirect_jump_resolvers/memload_resolver.py +81 -0
- angr/analyses/cfg/indirect_jump_resolvers/propagator_utils.py +24 -5
- angr/analyses/cfg/indirect_jump_resolvers/x86_pe_iat.py +2 -5
- angr/analyses/congruency_check.py +2 -3
- angr/analyses/data_dep/data_dependency_analysis.py +2 -2
- angr/analyses/ddg.py +1 -4
- angr/analyses/decompiler/ail_simplifier.py +3 -4
- angr/analyses/decompiler/clinic.py +42 -7
- angr/analyses/decompiler/optimization_passes/duplication_reverter/ail_merge_graph.py +2 -2
- angr/analyses/decompiler/optimization_passes/duplication_reverter/duplication_reverter.py +2 -2
- angr/analyses/decompiler/optimization_passes/ite_region_converter.py +1 -1
- angr/analyses/decompiler/optimization_passes/lowered_switch_simplifier.py +1 -1
- angr/analyses/decompiler/optimization_passes/stack_canary_simplifier.py +1 -1
- angr/analyses/decompiler/structuring/phoenix.py +1 -1
- angr/analyses/disassembly.py +5 -5
- angr/analyses/fcp/__init__.py +4 -0
- angr/analyses/fcp/fcp.py +429 -0
- angr/analyses/identifier/identify.py +1 -3
- angr/analyses/loopfinder.py +4 -3
- angr/analyses/patchfinder.py +1 -1
- angr/analyses/propagator/engine_base.py +4 -3
- angr/analyses/propagator/propagator.py +14 -53
- angr/analyses/reassembler.py +1 -2
- angr/analyses/s_propagator.py +1 -3
- angr/analyses/soot_class_hierarchy.py +1 -2
- angr/analyses/stack_pointer_tracker.py +18 -2
- angr/analyses/static_hooker.py +1 -2
- angr/analyses/typehoon/simple_solver.py +2 -2
- angr/analyses/variable_recovery/variable_recovery_fast.py +1 -2
- angr/analyses/veritesting.py +4 -7
- angr/analyses/vfg.py +1 -1
- angr/analyses/vsa_ddg.py +1 -2
- angr/block.py +3 -2
- angr/callable.py +1 -3
- angr/calling_conventions.py +3 -3
- angr/codenode.py +5 -1
- angr/concretization_strategies/__init__.py +1 -83
- angr/concretization_strategies/any.py +2 -1
- angr/concretization_strategies/any_named.py +1 -1
- angr/concretization_strategies/base.py +81 -0
- angr/concretization_strategies/controlled_data.py +2 -1
- angr/concretization_strategies/eval.py +2 -1
- angr/concretization_strategies/logging.py +3 -1
- angr/concretization_strategies/max.py +2 -1
- angr/concretization_strategies/nonzero.py +2 -1
- angr/concretization_strategies/nonzero_range.py +2 -1
- angr/concretization_strategies/norepeats.py +2 -1
- angr/concretization_strategies/norepeats_range.py +2 -1
- angr/concretization_strategies/range.py +2 -1
- angr/concretization_strategies/signed_add.py +2 -1
- angr/concretization_strategies/single.py +2 -1
- angr/concretization_strategies/solutions.py +2 -1
- angr/concretization_strategies/unlimited_range.py +2 -1
- angr/engines/__init__.py +8 -5
- angr/engines/engine.py +3 -5
- angr/engines/failure.py +4 -5
- angr/engines/procedure.py +5 -7
- angr/engines/soot/expressions/__init__.py +22 -23
- angr/engines/soot/expressions/base.py +4 -4
- angr/engines/soot/expressions/invoke.py +1 -2
- angr/engines/soot/statements/__init__.py +9 -10
- angr/engines/soot/values/__init__.py +9 -10
- angr/engines/soot/values/arrayref.py +3 -3
- angr/engines/soot/values/instancefieldref.py +3 -2
- angr/engines/successors.py +7 -6
- angr/engines/syscall.py +4 -6
- angr/engines/unicorn.py +3 -2
- angr/engines/vex/claripy/ccall.py +8 -10
- angr/engines/vex/claripy/datalayer.py +4 -5
- angr/exploration_techniques/__init__.py +0 -2
- angr/exploration_techniques/spiller.py +1 -3
- angr/exploration_techniques/stochastic.py +2 -3
- angr/factory.py +3 -9
- angr/knowledge_plugins/cfg/cfg_model.py +20 -17
- angr/knowledge_plugins/functions/function.py +70 -73
- angr/knowledge_plugins/functions/function_manager.py +8 -7
- angr/knowledge_plugins/functions/function_parser.py +1 -1
- angr/knowledge_plugins/functions/soot_function.py +16 -16
- angr/knowledge_plugins/propagations/propagation_model.py +4 -5
- angr/knowledge_plugins/propagations/states.py +0 -511
- angr/lib/angr_native.dylib +0 -0
- angr/procedures/libc/memcpy.py +4 -4
- angr/procedures/procedure_dict.py +3 -2
- angr/protos/__init__.py +2 -5
- angr/protos/cfg_pb2.py +21 -18
- angr/protos/function_pb2.py +17 -14
- angr/protos/primitives_pb2.py +44 -39
- angr/protos/variables_pb2.py +36 -31
- angr/protos/xrefs_pb2.py +15 -12
- angr/sim_procedure.py +15 -16
- angr/sim_variable.py +13 -1
- angr/simos/__init__.py +2 -0
- angr/simos/javavm.py +4 -6
- angr/simos/xbox.py +32 -0
- angr/state_plugins/__init__.py +0 -2
- angr/state_plugins/callstack.py +4 -4
- angr/state_plugins/cgc.py +3 -2
- angr/state_plugins/gdb.py +6 -5
- angr/state_plugins/globals.py +1 -2
- angr/state_plugins/heap/heap_brk.py +1 -2
- angr/state_plugins/history.py +10 -12
- angr/state_plugins/inspect.py +3 -5
- angr/state_plugins/libc.py +2 -2
- angr/state_plugins/log.py +8 -10
- angr/state_plugins/loop_data.py +1 -2
- angr/state_plugins/posix.py +7 -7
- angr/state_plugins/preconstrainer.py +2 -3
- angr/state_plugins/scratch.py +5 -8
- angr/state_plugins/sim_action.py +3 -3
- angr/state_plugins/solver.py +8 -3
- angr/state_plugins/symbolizer.py +5 -4
- angr/state_plugins/uc_manager.py +3 -3
- angr/state_plugins/unicorn_engine.py +5 -1
- angr/state_plugins/view.py +3 -5
- angr/storage/file.py +3 -5
- angr/storage/memory_mixins/address_concretization_mixin.py +2 -2
- angr/storage/memory_mixins/bvv_conversion_mixin.py +3 -3
- angr/storage/memory_mixins/clouseau_mixin.py +1 -3
- angr/storage/memory_mixins/name_resolution_mixin.py +1 -3
- angr/storage/memory_mixins/paged_memory/paged_memory_mixin.py +13 -15
- angr/storage/memory_mixins/paged_memory/pages/__init__.py +1 -22
- angr/storage/memory_mixins/paged_memory/pages/base.py +31 -0
- angr/storage/memory_mixins/paged_memory/pages/list_page.py +1 -1
- angr/storage/memory_mixins/paged_memory/pages/mv_list_page.py +1 -1
- angr/storage/memory_mixins/paged_memory/pages/ultra_page.py +2 -4
- angr/storage/memory_mixins/paged_memory/privileged_mixin.py +3 -4
- angr/storage/memory_mixins/regioned_memory/abstract_merger_mixin.py +4 -2
- angr/storage/memory_mixins/smart_find_mixin.py +1 -1
- angr/storage/memory_mixins/underconstrained_mixin.py +1 -1
- angr/storage/memory_mixins/unwrapper_mixin.py +1 -3
- angr/utils/enums_conv.py +28 -12
- angr/utils/segment_list.py +25 -22
- angr/utils/timing.py +18 -1
- angr/vaults.py +5 -6
- {angr-9.2.135.dist-info → angr-9.2.136.dist-info}/METADATA +6 -6
- {angr-9.2.135.dist-info → angr-9.2.136.dist-info}/RECORD +161 -160
- {angr-9.2.135.dist-info → angr-9.2.136.dist-info}/WHEEL +1 -1
- angr/analyses/propagator/outdated_definition_walker.py +0 -159
- angr/analyses/propagator/tmpvar_finder.py +0 -18
- angr/engines/concrete.py +0 -180
- angr/exploration_techniques/symbion.py +0 -80
- angr/state_plugins/concrete.py +0 -295
- {angr-9.2.135.dist-info → angr-9.2.136.dist-info}/LICENSE +0 -0
- {angr-9.2.135.dist-info → angr-9.2.136.dist-info}/entry_points.txt +0 -0
- {angr-9.2.135.dist-info → angr-9.2.136.dist-info}/top_level.txt +0 -0
angr/protos/cfg_pb2.py
CHANGED
|
@@ -1,39 +1,42 @@
|
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
2
|
# NO CHECKED-IN PROTOBUF GENCODE
|
|
3
|
-
# source: protos/cfg.proto
|
|
3
|
+
# source: angr/protos/cfg.proto
|
|
4
4
|
# Protobuf Python Version: 5.28.2
|
|
5
5
|
"""Generated protocol buffer code."""
|
|
6
|
-
|
|
7
6
|
from google.protobuf import descriptor as _descriptor
|
|
8
7
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
8
|
from google.protobuf import runtime_version as _runtime_version
|
|
10
9
|
from google.protobuf import symbol_database as _symbol_database
|
|
11
10
|
from google.protobuf.internal import builder as _builder
|
|
12
|
-
|
|
13
|
-
_runtime_version.
|
|
11
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
12
|
+
_runtime_version.Domain.PUBLIC,
|
|
13
|
+
5,
|
|
14
|
+
28,
|
|
15
|
+
2,
|
|
16
|
+
'',
|
|
17
|
+
'angr/protos/cfg.proto'
|
|
18
|
+
)
|
|
14
19
|
# @@protoc_insertion_point(imports)
|
|
15
20
|
|
|
16
21
|
_sym_db = _symbol_database.Default()
|
|
17
22
|
|
|
18
23
|
|
|
19
|
-
from . import primitives_pb2 as
|
|
24
|
+
from angr.protos import primitives_pb2 as angr_dot_protos_dot_primitives__pb2
|
|
20
25
|
|
|
21
26
|
|
|
22
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
|
|
23
|
-
b'\n\x10protos/cfg.proto\x12\x0b\x61ngr.protos\x1a\x17protos/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'
|
|
24
|
-
)
|
|
27
|
+
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')
|
|
25
28
|
|
|
26
29
|
_globals = globals()
|
|
27
30
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
28
|
-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR,
|
|
31
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'angr.protos.cfg_pb2', _globals)
|
|
29
32
|
if not _descriptor._USE_C_DESCRIPTORS:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
|
39
42
|
# @@protoc_insertion_point(module_scope)
|
angr/protos/function_pb2.py
CHANGED
|
@@ -1,35 +1,38 @@
|
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
2
|
# NO CHECKED-IN PROTOBUF GENCODE
|
|
3
|
-
# source: protos/function.proto
|
|
3
|
+
# source: angr/protos/function.proto
|
|
4
4
|
# Protobuf Python Version: 5.28.2
|
|
5
5
|
"""Generated protocol buffer code."""
|
|
6
|
-
|
|
7
6
|
from google.protobuf import descriptor as _descriptor
|
|
8
7
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
8
|
from google.protobuf import runtime_version as _runtime_version
|
|
10
9
|
from google.protobuf import symbol_database as _symbol_database
|
|
11
10
|
from google.protobuf.internal import builder as _builder
|
|
12
|
-
|
|
13
|
-
_runtime_version.
|
|
11
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
12
|
+
_runtime_version.Domain.PUBLIC,
|
|
13
|
+
5,
|
|
14
|
+
28,
|
|
15
|
+
2,
|
|
16
|
+
'',
|
|
17
|
+
'angr/protos/function.proto'
|
|
18
|
+
)
|
|
14
19
|
# @@protoc_insertion_point(imports)
|
|
15
20
|
|
|
16
21
|
_sym_db = _symbol_database.Default()
|
|
17
22
|
|
|
18
23
|
|
|
19
|
-
from . import primitives_pb2 as
|
|
24
|
+
from angr.protos import primitives_pb2 as angr_dot_protos_dot_primitives__pb2
|
|
20
25
|
|
|
21
26
|
|
|
22
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
|
|
23
|
-
b'\n\x15protos/function.proto\x12\x0b\x61ngr.protos\x1a\x17protos/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'
|
|
24
|
-
)
|
|
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')
|
|
25
28
|
|
|
26
29
|
_globals = globals()
|
|
27
30
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
28
|
-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR,
|
|
31
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'angr.protos.function_pb2', _globals)
|
|
29
32
|
if not _descriptor._USE_C_DESCRIPTORS:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
|
35
38
|
# @@protoc_insertion_point(module_scope)
|
angr/protos/primitives_pb2.py
CHANGED
|
@@ -1,58 +1,63 @@
|
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
2
|
# NO CHECKED-IN PROTOBUF GENCODE
|
|
3
|
-
# source: protos/primitives.proto
|
|
3
|
+
# source: angr/protos/primitives.proto
|
|
4
4
|
# Protobuf Python Version: 5.28.2
|
|
5
5
|
"""Generated protocol buffer code."""
|
|
6
|
-
|
|
7
6
|
from google.protobuf import descriptor as _descriptor
|
|
8
7
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
8
|
from google.protobuf import runtime_version as _runtime_version
|
|
10
9
|
from google.protobuf import symbol_database as _symbol_database
|
|
11
10
|
from google.protobuf.internal import builder as _builder
|
|
12
|
-
|
|
13
|
-
_runtime_version.
|
|
11
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
12
|
+
_runtime_version.Domain.PUBLIC,
|
|
13
|
+
5,
|
|
14
|
+
28,
|
|
15
|
+
2,
|
|
16
|
+
'',
|
|
17
|
+
'angr/protos/primitives.proto'
|
|
18
|
+
)
|
|
14
19
|
# @@protoc_insertion_point(imports)
|
|
15
20
|
|
|
16
21
|
_sym_db = _symbol_database.Default()
|
|
17
22
|
|
|
18
23
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
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')
|
|
22
27
|
|
|
23
28
|
_globals = globals()
|
|
24
29
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
25
|
-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR,
|
|
30
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'angr.protos.primitives_pb2', _globals)
|
|
26
31
|
if not _descriptor._USE_C_DESCRIPTORS:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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
|
|
58
63
|
# @@protoc_insertion_point(module_scope)
|
angr/protos/variables_pb2.py
CHANGED
|
@@ -1,50 +1,55 @@
|
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
2
|
# NO CHECKED-IN PROTOBUF GENCODE
|
|
3
|
-
# source: protos/variables.proto
|
|
3
|
+
# source: angr/protos/variables.proto
|
|
4
4
|
# Protobuf Python Version: 5.28.2
|
|
5
5
|
"""Generated protocol buffer code."""
|
|
6
|
-
|
|
7
6
|
from google.protobuf import descriptor as _descriptor
|
|
8
7
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
8
|
from google.protobuf import runtime_version as _runtime_version
|
|
10
9
|
from google.protobuf import symbol_database as _symbol_database
|
|
11
10
|
from google.protobuf.internal import builder as _builder
|
|
12
|
-
|
|
13
|
-
_runtime_version.
|
|
11
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
12
|
+
_runtime_version.Domain.PUBLIC,
|
|
13
|
+
5,
|
|
14
|
+
28,
|
|
15
|
+
2,
|
|
16
|
+
'',
|
|
17
|
+
'angr/protos/variables.proto'
|
|
18
|
+
)
|
|
14
19
|
# @@protoc_insertion_point(imports)
|
|
15
20
|
|
|
16
21
|
_sym_db = _symbol_database.Default()
|
|
17
22
|
|
|
18
23
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
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')
|
|
22
27
|
|
|
23
28
|
_globals = globals()
|
|
24
29
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
25
|
-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR,
|
|
30
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'angr.protos.variables_pb2', _globals)
|
|
26
31
|
if not _descriptor._USE_C_DESCRIPTORS:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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
|
|
50
55
|
# @@protoc_insertion_point(module_scope)
|
angr/protos/xrefs_pb2.py
CHANGED
|
@@ -1,33 +1,36 @@
|
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
2
|
# NO CHECKED-IN PROTOBUF GENCODE
|
|
3
|
-
# source: protos/xrefs.proto
|
|
3
|
+
# source: angr/protos/xrefs.proto
|
|
4
4
|
# Protobuf Python Version: 5.28.2
|
|
5
5
|
"""Generated protocol buffer code."""
|
|
6
|
-
|
|
7
6
|
from google.protobuf import descriptor as _descriptor
|
|
8
7
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
8
|
from google.protobuf import runtime_version as _runtime_version
|
|
10
9
|
from google.protobuf import symbol_database as _symbol_database
|
|
11
10
|
from google.protobuf.internal import builder as _builder
|
|
12
|
-
|
|
13
|
-
_runtime_version.
|
|
11
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
12
|
+
_runtime_version.Domain.PUBLIC,
|
|
13
|
+
5,
|
|
14
|
+
28,
|
|
15
|
+
2,
|
|
16
|
+
'',
|
|
17
|
+
'angr/protos/xrefs.proto'
|
|
18
|
+
)
|
|
14
19
|
# @@protoc_insertion_point(imports)
|
|
15
20
|
|
|
16
21
|
_sym_db = _symbol_database.Default()
|
|
17
22
|
|
|
18
23
|
|
|
19
|
-
from . import primitives_pb2 as
|
|
24
|
+
from angr.protos import primitives_pb2 as angr_dot_protos_dot_primitives__pb2
|
|
20
25
|
|
|
21
26
|
|
|
22
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
|
|
23
|
-
b'\n\x12protos/xrefs.proto\x12\x0b\x61ngr.protos\x1a\x17protos/primitives.proto"2\n\x05XRefs\x12)\n\x05xrefs\x18\x01 \x03(\x0b\x32\x1a.angr.protos.CodeReferenceb\x06proto3'
|
|
24
|
-
)
|
|
27
|
+
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')
|
|
25
28
|
|
|
26
29
|
_globals = globals()
|
|
27
30
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
28
|
-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR,
|
|
31
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'angr.protos.xrefs_pb2', _globals)
|
|
29
32
|
if not _descriptor._USE_C_DESCRIPTORS:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
DESCRIPTOR._loaded_options = None
|
|
34
|
+
_globals['_XREFS']._serialized_start=70
|
|
35
|
+
_globals['_XREFS']._serialized_end=120
|
|
33
36
|
# @@protoc_insertion_point(module_scope)
|
angr/sim_procedure.py
CHANGED
|
@@ -9,6 +9,21 @@ import claripy
|
|
|
9
9
|
from cle import SymbolType
|
|
10
10
|
from archinfo.arch_soot import SootAddressDescriptor
|
|
11
11
|
|
|
12
|
+
from angr import sim_options as o
|
|
13
|
+
from angr.errors import SimProcedureError, SimShadowStackError
|
|
14
|
+
from angr.state_plugins.sim_action import SimActionExit
|
|
15
|
+
from angr.calling_conventions import (
|
|
16
|
+
DEFAULT_CC,
|
|
17
|
+
default_cc,
|
|
18
|
+
SimTypeFunction,
|
|
19
|
+
SimTypePointer,
|
|
20
|
+
SimTypeChar,
|
|
21
|
+
ArgSession,
|
|
22
|
+
SimTypeNum,
|
|
23
|
+
)
|
|
24
|
+
from .state_plugins import BP_AFTER, BP_BEFORE, NO_OVERRIDE
|
|
25
|
+
from .sim_type import parse_signature, parse_type
|
|
26
|
+
|
|
12
27
|
if TYPE_CHECKING:
|
|
13
28
|
import angr
|
|
14
29
|
import archinfo
|
|
@@ -589,19 +604,3 @@ class SimProcedure:
|
|
|
589
604
|
@return_type.setter
|
|
590
605
|
def return_type(self, v): # pylint: disable=unused-argument,no-self-use
|
|
591
606
|
l.critical("SimProcedure.return_type is deprecated. specify the function signature in the prototype param")
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
from . import sim_options as o
|
|
595
|
-
from angr.errors import SimProcedureError, SimShadowStackError
|
|
596
|
-
from angr.state_plugins.sim_action import SimActionExit
|
|
597
|
-
from angr.calling_conventions import (
|
|
598
|
-
DEFAULT_CC,
|
|
599
|
-
default_cc,
|
|
600
|
-
SimTypeFunction,
|
|
601
|
-
SimTypePointer,
|
|
602
|
-
SimTypeChar,
|
|
603
|
-
ArgSession,
|
|
604
|
-
SimTypeNum,
|
|
605
|
-
)
|
|
606
|
-
from .state_plugins import BP_AFTER, BP_BEFORE, NO_OVERRIDE
|
|
607
|
-
from .sim_type import parse_signature, parse_type
|
angr/sim_variable.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
import collections.abc
|
|
3
3
|
from typing import TYPE_CHECKING
|
|
4
|
+
import logging
|
|
4
5
|
|
|
5
6
|
import claripy
|
|
6
7
|
|
|
@@ -11,6 +12,9 @@ if TYPE_CHECKING:
|
|
|
11
12
|
import archinfo
|
|
12
13
|
|
|
13
14
|
|
|
15
|
+
_l = logging.getLogger(__name__)
|
|
16
|
+
|
|
17
|
+
|
|
14
18
|
class SimVariable(Serializable):
|
|
15
19
|
__slots__ = [
|
|
16
20
|
"candidate_names",
|
|
@@ -388,7 +392,15 @@ class SimStackVariable(SimMemoryVariable):
|
|
|
388
392
|
obj = self._get_cmsg()
|
|
389
393
|
self._set_base(obj)
|
|
390
394
|
obj.sp_base = self.base == "sp"
|
|
391
|
-
|
|
395
|
+
if not -0x8000_0000 <= self.offset < 0x8000_0000:
|
|
396
|
+
_l.warning(
|
|
397
|
+
"The offset of stack variable %r (%d) is out of allowable range; force it to within the int32 range.",
|
|
398
|
+
self,
|
|
399
|
+
self.offset,
|
|
400
|
+
)
|
|
401
|
+
obj.offset = -0x7FFF_DEAD if self.offset < 0 else 0x7FFF_DEAD
|
|
402
|
+
else:
|
|
403
|
+
obj.offset = self.offset
|
|
392
404
|
obj.size = self.size
|
|
393
405
|
return obj
|
|
394
406
|
|
angr/simos/__init__.py
CHANGED
|
@@ -14,6 +14,7 @@ from .cgc import SimCGC
|
|
|
14
14
|
from .windows import SimWindows
|
|
15
15
|
from .javavm import SimJavaVM
|
|
16
16
|
from .snimmuc_nxp import SimSnimmucNxp
|
|
17
|
+
from .xbox import SimXbox
|
|
17
18
|
|
|
18
19
|
os_mapping = defaultdict(lambda: SimOS)
|
|
19
20
|
|
|
@@ -31,6 +32,7 @@ register_simos("windows", SimWindows)
|
|
|
31
32
|
register_simos("cgc", SimCGC)
|
|
32
33
|
register_simos("javavm", SimJavaVM)
|
|
33
34
|
register_simos("snimmuc_nxp", SimSnimmucNxp)
|
|
35
|
+
register_simos("xbox", SimXbox)
|
|
34
36
|
|
|
35
37
|
|
|
36
38
|
__all__ = (
|
angr/simos/javavm.py
CHANGED
|
@@ -3,12 +3,11 @@ from __future__ import annotations
|
|
|
3
3
|
import logging
|
|
4
4
|
|
|
5
5
|
from archinfo.arch_soot import ArchSoot, SootAddressDescriptor, SootAddressTerminator, SootArgument, SootNullConstant
|
|
6
|
-
from claripy import BVS, BVV, StringS, StringV, FSORT_FLOAT, FSORT_DOUBLE, FPV, FPS
|
|
7
|
-
from claripy.ast
|
|
8
|
-
from claripy.ast.bv import BV
|
|
6
|
+
from claripy import BVS, BVV, StringS, StringV, FSORT_FLOAT, FSORT_DOUBLE, FPV, FPS, fpToIEEEBV
|
|
7
|
+
from claripy.ast import BV, FP
|
|
9
8
|
|
|
9
|
+
import angr
|
|
10
10
|
from angr import SIM_PROCEDURES, options
|
|
11
|
-
|
|
12
11
|
from angr.calling_conventions import default_cc, SimCCSoot
|
|
13
12
|
from angr.engines.soot import SootMixin
|
|
14
13
|
from angr.engines.soot.expressions import SimSootExpr_NewArray
|
|
@@ -44,12 +43,11 @@ class SimJavaVM(SimOS):
|
|
|
44
43
|
raise AngrSimOSError("No JNI lib was loaded. Is the jni_libs_ld_path set correctly?")
|
|
45
44
|
|
|
46
45
|
# Step 2: determine and set the native SimOS
|
|
47
|
-
from . import os_mapping # import dynamically, since the JavaVM class is part of the os_mapping dict
|
|
48
46
|
|
|
49
47
|
# for each native library get the Arch
|
|
50
48
|
native_libs_arch = {obj.arch.__class__ for obj in self.native_libs}
|
|
51
49
|
# for each native library get the compatible SimOS
|
|
52
|
-
native_libs_simos = {os_mapping[obj.os] for obj in self.native_libs}
|
|
50
|
+
native_libs_simos = {angr.simos.os_mapping[obj.os] for obj in self.native_libs}
|
|
53
51
|
# show warning, if more than one SimOS or Arch would be required
|
|
54
52
|
if len(native_libs_simos) > 1 or len(native_libs_arch) > 1:
|
|
55
53
|
l.warning(
|
angr/simos/xbox.py
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
try:
|
|
4
|
+
import xbe
|
|
5
|
+
except ImportError:
|
|
6
|
+
xbe = None
|
|
7
|
+
|
|
8
|
+
from angr.procedures import SIM_PROCEDURES
|
|
9
|
+
from angr.calling_conventions import SimCCStdcall
|
|
10
|
+
from .simos import SimOS
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class SimXbox(SimOS):
|
|
14
|
+
"""
|
|
15
|
+
Environment for the original Xbox subsystem (x86, 32-bit).
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
def __init__(self, project):
|
|
19
|
+
super().__init__(project, name="Xbox")
|
|
20
|
+
|
|
21
|
+
def configure_project(self):
|
|
22
|
+
super().configure_project()
|
|
23
|
+
|
|
24
|
+
if xbe is None:
|
|
25
|
+
raise ImportError("Please install pyxbe to use the SimXbox environment")
|
|
26
|
+
|
|
27
|
+
stub_cls = SIM_PROCEDURES["stubs"]["ReturnUnconstrained"]
|
|
28
|
+
for export_no, export_name in xbe.XbeKernelImage.exports.items():
|
|
29
|
+
addr = 0x8000_0000 + export_no
|
|
30
|
+
cc = SimCCStdcall(self.project.arch)
|
|
31
|
+
hooker = stub_cls(cc=cc, display_name=export_name, library_name="xboxkrnl.exe", is_stub=True)
|
|
32
|
+
self.project.hook(addr, hooker, replace=True)
|
angr/state_plugins/__init__.py
CHANGED
|
@@ -23,7 +23,6 @@ from .loop_data import SimStateLoopData
|
|
|
23
23
|
from .view import SimRegNameView, SimMemView, StructMode
|
|
24
24
|
from .filesystem import Stat, SimFilesystem, SimMount, SimHostFilesystem
|
|
25
25
|
from .heap import SimHeapBase, SimHeapBrk, SimHeapLibc, SimHeapPTMalloc, PTChunk, PTChunkIterator
|
|
26
|
-
from .concrete import Concrete
|
|
27
26
|
from .jni_references import SimStateJNIReferences
|
|
28
27
|
from .javavm_classloader import SimJavaVmClassloader
|
|
29
28
|
from .symbolizer import SimSymbolizer
|
|
@@ -39,7 +38,6 @@ __all__ = (
|
|
|
39
38
|
"GDB",
|
|
40
39
|
"NO_OVERRIDE",
|
|
41
40
|
"CallStack",
|
|
42
|
-
"Concrete",
|
|
43
41
|
"PTChunk",
|
|
44
42
|
"PTChunkIterator",
|
|
45
43
|
"PosixDevFS",
|
angr/state_plugins/callstack.py
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
|
+
|
|
2
3
|
import collections
|
|
3
|
-
from itertools import dropwhile
|
|
4
4
|
import logging
|
|
5
5
|
from collections.abc import Iterator
|
|
6
|
+
from itertools import dropwhile
|
|
6
7
|
|
|
7
|
-
from .plugin import SimStatePlugin
|
|
8
8
|
from angr.errors import AngrError, SimEmptyCallStackError
|
|
9
|
+
from angr.sim_state import SimState
|
|
10
|
+
from .plugin import SimStatePlugin
|
|
9
11
|
|
|
10
12
|
l = logging.getLogger(name=__name__)
|
|
11
13
|
|
|
@@ -393,6 +395,4 @@ class CallStackAction:
|
|
|
393
395
|
return f"<CallStackAction pop, ret site {self.ret_site_addr:#x}>"
|
|
394
396
|
|
|
395
397
|
|
|
396
|
-
from angr.sim_state import SimState
|
|
397
|
-
|
|
398
398
|
SimState.register_default("callstack", CallStack)
|
angr/state_plugins/cgc.py
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
|
+
|
|
2
3
|
import operator
|
|
4
|
+
|
|
5
|
+
from angr.sim_state import SimState
|
|
3
6
|
from .plugin import SimStatePlugin
|
|
4
7
|
|
|
5
8
|
|
|
@@ -149,6 +152,4 @@ class SimStateCGC(SimStatePlugin):
|
|
|
149
152
|
self.sinkholes.add((address, length))
|
|
150
153
|
|
|
151
154
|
|
|
152
|
-
from angr.sim_state import SimState
|
|
153
|
-
|
|
154
155
|
SimState.register_default("cgc", SimStateCGC)
|
angr/state_plugins/gdb.py
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import binascii
|
|
4
|
+
import logging
|
|
2
5
|
import os
|
|
3
6
|
import re
|
|
4
|
-
|
|
7
|
+
|
|
5
8
|
import claripy
|
|
6
|
-
import binascii
|
|
7
9
|
|
|
8
|
-
from .plugin import SimStatePlugin
|
|
9
10
|
from angr.errors import SimStateError
|
|
11
|
+
from angr.sim_state import SimState
|
|
12
|
+
from .plugin import SimStatePlugin
|
|
10
13
|
|
|
11
14
|
l = logging.getLogger(name=__name__)
|
|
12
15
|
|
|
@@ -142,6 +145,4 @@ class GDB(SimStatePlugin):
|
|
|
142
145
|
return GDB()
|
|
143
146
|
|
|
144
147
|
|
|
145
|
-
from angr.sim_state import SimState
|
|
146
|
-
|
|
147
148
|
SimState.register_default("gdb", GDB)
|