summaryrefslogtreecommitdiff
path: root/python/examples/triage/imports.py
diff options
context:
space:
mode:
authorJordan Wiens <jordan@psifertex.com>2024-10-02 18:04:48 -0400
committerJordan Wiens <jordan@psifertex.com>2024-10-02 18:04:48 -0400
commitfefe5882f0e2ef445f509b5b73f4dbce4f15944f (patch)
tree425c9ee11448e6bf3ae94ec0cdee26ff903c323f /python/examples/triage/imports.py
parentfc28e5142593e69a960ab8dd72ff88a2f06065da (diff)
update to get python triage example working on recent builds
Diffstat (limited to 'python/examples/triage/imports.py')
-rw-r--r--python/examples/triage/imports.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/python/examples/triage/imports.py b/python/examples/triage/imports.py
index 55b09c6d..dbe8ed47 100644
--- a/python/examples/triage/imports.py
+++ b/python/examples/triage/imports.py
@@ -137,17 +137,17 @@ def find_dynamically_linked_funcs(bv):
mlil_ssa = f.medium_level_il.ssa_form
for call in find_mlil_calls_to_targets(mlil_ssa, platform_info["sym_lookups"]):
- if len(call.params) < 2 or len(call.output.vars_written) < 1:
+ if len(call.params) < 2 or len(call.output) < 1:
continue
symbol_name_addr = call.params[1].value
if symbol_name_addr.type not in [RegisterValueType.ConstantPointerValue, RegisterValueType.ConstantValue]:
continue
- output_var = call.output.vars_written[0]
+ output_var = call.output[0]
symbol_name = bv.get_ascii_string_at(symbol_name_addr.value).value
- #Add confidence to both the args and the return of zero
- symbol_type = Type.pointer(bv.parse_type_string("void foo()")[0], arch=bv.arch)
+ # Add confidence to both the args and the return of zero
+ symbol_type = Type.pointer(bv.arch, bv.parse_type_string("void foo()")[0])
if len(symbol_name) == 0:
continue