Skip to content

Instantly share code, notes, and snippets.

@romainthomas
Last active November 3, 2017 05:49
Show Gist options
  • Save romainthomas/5bcffaac23236a78ea14 to your computer and use it in GitHub Desktop.
Save romainthomas/5bcffaac23236a78ea14 to your computer and use it in GitHub Desktop.
[IDA] Hint on instructions
#
# Show a hint when the user has his mouse on an instruction
#
import idaapi
import idautils
class Hooks(idaapi.UI_Hooks):
def get_custom_viewer_hint(self, view, place):
insn = idautils.DecodeInstruction(place.toea())
if insn:
hint = "Instruction is a: %s" % insn.get_canon_mnem()
return (hint, 1)
myHook = Hooks()
myHook.hook()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment