Skip to content

Instantly share code, notes, and snippets.

@0xbc
Created September 7, 2017 02:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0xbc/0bab19e93c76dea1679abec1417ee22f to your computer and use it in GitHub Desktop.
Save 0xbc/0bab19e93c76dea1679abec1417ee22f to your computer and use it in GitHub Desktop.
Changing the display type of integer operands in BinaryNinja
# assuming f is a Function
insts = [ inst for inst in f.low_level_il.basic_blocks[0] if inst.address >= 0x1013a0b and inst.address <= 0x1013c42 ]
for inst in insts:
f.set_int_display_type(inst.address, value=inst.src.value.value, operand=1,
display_type=enums.IntegerDisplayType.CharacterConstantDisplayType)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment