Last active
November 3, 2017 05:49
-
-
Save romainthomas/5bcffaac23236a78ea14 to your computer and use it in GitHub Desktop.
[IDA] Hint on instructions
This file contains hidden or 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
# | |
# 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