MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / get_platform_info

Function get_platform_info

python/examples/triage/imports.py:24–47  ·  view source on GitHub ↗
(bv)

Source from the content-addressed store, hash-verified

22
23
24def get_platform_info(bv):
25 result = {
26 "sym_lookups": [],
27 }
28
29 if bv.platform is None:
30 return result
31
32 def check_prefix(platform_name, prefixes):
33 for prefix in prefixes:
34 if platform_name.startswith(prefix):
35 return True
36 return False
37
38 for p in platform_info:
39 if check_prefix(bv.platform.name, p["prefixes"]):
40 break
41 else:
42 return result
43
44 syms = map(bv.get_symbol_by_raw_name, p["sym_lookups"])
45 result["sym_lookups"] = [sym.address for sym in filter(lambda x: x is not None, syms)]
46
47 return result
48
49def propagate_var_name(func, mlil_ssa_func, ssa_var, name, ty):
50 instructions = list(map(lambda instr: instr.instr_index, mlil_ssa_func.get_ssa_var_uses(ssa_var)))

Callers 1

Calls 1

check_prefixFunction · 0.85

Tested by

no test coverage detected