Skip to content

Instantly share code, notes, and snippets.

@icecr4ck
Last active December 6, 2023 12:36

Revisions

  1. icecr4ck revised this gist Jul 12, 2021. No changes.
  2. icecr4ck revised this gist Mar 24, 2021. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions plugin_ida.py
    Original file line number Diff line number Diff line change
    @@ -7,14 +7,14 @@ class ExamplePlugin(idaapi.plugin_t):
    wanted_name = "Example"
    wanted_hotkey = "Alt-F11"

    def init():
    def init(self):
    return idaapi.PLUGIN_KEEP # On garde le plugin chargé en mémoire

    def run():
    def run(self, arg):
    # Code à exécuter lors du lancement via l'interface
    return

    def term():
    def term(self):
    # Code à exécuter lors du déchargement du plugin
    # par exemple, lors de la fermeture de l'idb.
    pass
  3. icecr4ck revised this gist Nov 25, 2020. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions plugin_ida.py
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    import idaapi

    class ExamplePlugin(plugin_t):
    flags = idaapi.PLUGIN_MOD # Ce plugin modifie la base
    class ExamplePlugin(idaapi.plugin_t):
    flags = idaapi.PLUGIN_DRAW
    comment = "This plugin does nothing useful"
    help = "No help is needed"
    wanted_name = "Example"
    @@ -17,7 +17,7 @@ def run():
    def term():
    # Code à exécuter lors du déchargement du plugin
    # par exemple, lors de la fermeture de l'idb.
    return
    pass

    def PLUGIN_ENTRY():
    return ExamplePlugin()
  4. icecr4ck revised this gist Oct 9, 2019. 1 changed file with 17 additions and 14 deletions.
    31 changes: 17 additions & 14 deletions plugin_ida.py
    Original file line number Diff line number Diff line change
    @@ -1,20 +1,23 @@
    # https://www.hexblog.com/?p=886
    import idaapi

    class MyHandler(ida_kernwin.action_handler_t):
    def __init__(self):
    ida_kernwin.action_handler_t.__init__(self)

    # Say hello when invoked.
    def activate(self, ctx):
    print "Hello!"
    return 1
    class ExamplePlugin(plugin_t):
    flags = idaapi.PLUGIN_MOD # Ce plugin modifie la base
    comment = "This plugin does nothing useful"
    help = "No help is needed"
    wanted_name = "Example"
    wanted_hotkey = "Alt-F11"

    # This action is always available.
    def update(self, ctx):
    return idaapi.AST_ENABLE_ALWAYS
    def init():
    return idaapi.PLUGIN_KEEP # On garde le plugin chargé en mémoire

    def run():
    # Code à exécuter lors du lancement via l'interface
    return

    ida_kernwin.attach_action_to_menu(""
    def term():
    # Code à exécuter lors du déchargement du plugin
    # par exemple, lors de la fermeture de l'idb.
    return

    # plugin_t instance
    def PLUGIN_ENTRY():
    return ExamplePlugin()
  5. icecr4ck created this gist Oct 9, 2019.
    20 changes: 20 additions & 0 deletions plugin_ida.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    # https://www.hexblog.com/?p=886

    class MyHandler(ida_kernwin.action_handler_t):
    def __init__(self):
    ida_kernwin.action_handler_t.__init__(self)

    # Say hello when invoked.
    def activate(self, ctx):
    print "Hello!"
    return 1

    # This action is always available.
    def update(self, ctx):
    return idaapi.AST_ENABLE_ALWAYS


    ida_kernwin.attach_action_to_menu(""

    # plugin_t instance
    def PLUGIN_ENTRY():