Skip to content

Add autostart feature with per-IDB preference#1

Open
hzqst wants to merge 4 commits intoGAMMACASE:masterfrom
hzqst:dev
Open

Add autostart feature with per-IDB preference#1
hzqst wants to merge 4 commits intoGAMMACASE:masterfrom
hzqst:dev

Conversation

@hzqst
Copy link
Copy Markdown

@hzqst hzqst commented Apr 23, 2026

Auto-patch PLT section when IDA opens an ELF64 database, with a configurable toggle under Edit -> Plugins -> PLT Patcher Configuration. Preference is stored per-IDB via netnode and defaults to enabled.

Tested and working fine on my end:

image

hzqst and others added 4 commits April 23, 2026 15:56
Auto-patch PLT section when IDA opens an ELF64 database, with a
configurable toggle under Edit -> Plugins -> PLT Patcher Configuration.
Preference is stored per-IDB via netnode and defaults to enabled.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hzqst
Copy link
Copy Markdown
Author

hzqst commented Apr 23, 2026

Changes:

  • Moved the autostart setting from per-IDB netnode storage to a user-global JSON config file (plt_patcher.json).

  • Added compatibility logic to resolve the IDA user config directory via idaapi, ida_diskio, IDAUSR, or ~/.idapro.

  • Changed the configuration prompt to describe a user-wide setting instead of a database-specific one.
    Made config read/write failures fall back safely: default to enabled, and keep session changes even if persistence fails.

  • Added ida_auto support to wait for IDA auto-analysis before running PLT patching.

  • Introduced _wait_for_auto_analysis(), which skips waiting if analysis is already finished and otherwise blocks with ida_auto.auto_wait().

  • Updated run() so both autostart and manual execution go through the same “wait first, then patch” path.
    This prevents patch_plt() from running too early and avoids errors like bad call add_dref.

Test result:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant