Skip to main content

Example IDA Plugin with multiple files

Project description

multifile-ida-plugin

An example IDA plugin that uses multiple files.

 multifile-ida-plugin
 ├── pyproject.toml
 ├── README.md
 └── src
     └── multifile_ida_plugin
         ├── __init__.py
         └── plugin
             └── __init__.py

There is a library multifile_ida_plugin with arbitrary code (in this case, a function multifile_ida_plugin.hello).

def hello():
  print("hello from Python (multifile)")

Then, there's an IDA plugin found in multifile_ida_plugin.plugin which corresponds to the file src/multifile_ida_plugin/plugin/__init__.py and contains the PLUGIN_ENTRY function expected by IDA.

import idaapi
import multifile_ida_plugin

class multifile_plugmod_t(idaapi.plugmod_t):
    def run(self, arg):
        multifile_ida_plugin.hello()
        return 0

class multifile_plugin_t(idaapi.plugin_t):
    ...
    def init(self):
        return multifile_plugmod_t()


def PLUGIN_ENTRY():
    return multifile_plugin_t()

The plugin invokes a routine from the library code, demonstrating how not all of the plugin code has to be bundled into the primary plugin file.

The pyproject.toml shows how to specify the location of the plugin:

[project.entry-points.'idapro.plugins']
idapython = "multifile_ida_plugin.plugin"

publishing

Published to PyPI as multifile-ida-plugin via the GH Action workflow publish-multifile-ida-plugin.yml.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

multifile_ida_plugin-0.1.0.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

multifile_ida_plugin-0.1.0-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file multifile_ida_plugin-0.1.0.tar.gz.

File metadata

  • Download URL: multifile_ida_plugin-0.1.0.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for multifile_ida_plugin-0.1.0.tar.gz
Algorithm Hash digest
SHA256 04129ecb6b85479c5bff8b8dc88f8c71d2105e546a2475a8ebde0dbdffbfe20c
MD5 d3c44f6b7760d7b6c0b759b76df8f390
BLAKE2b-256 2d64f8e1e066445d72839f058471a0f3c9dc346c43488b618ba4b7764bff5fed

See more details on using hashes here.

Provenance

The following attestation bundles were made for multifile_ida_plugin-0.1.0.tar.gz:

Publisher: publish-multifile-ida-plugin.yml on williballenthin/idawilli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file multifile_ida_plugin-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for multifile_ida_plugin-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 90f6404a3ea627623af517f031f8458ce494220f239a0094f84d22d81c8d320f
MD5 32ade46709b9dc343477f3f651a4d517
BLAKE2b-256 67c4f32baf06a1ee8cae4d221d81871250d1f8428b8e8872fd92355d0093828a

See more details on using hashes here.

Provenance

The following attestation bundles were made for multifile_ida_plugin-0.1.0-py3-none-any.whl:

Publisher: publish-multifile-ida-plugin.yml on williballenthin/idawilli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page