Created
February 8, 2020 16:59
-
-
Save cetfor/93418bc75d6c8d1001d2d469e8e1827f to your computer and use it in GitHub Desktop.
How to get Binary Ninja's MLIL SSA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get MLIL SSA form | |
import binaryninja | |
target = "cwe369A_x64" | |
print("Analyzing file: {}".format(target)) | |
bv = binaryninja.BinaryViewType.get_view_of_file(target) | |
bv.add_analysis_option('linearsweep') | |
for func in bv.functions: | |
if func.name != "main": continue | |
print("Function: {}".format(func.name)) | |
for block in func.medium_level_il.ssa_form: | |
for instr in block: | |
print(instr) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment