P1: Search (bytes/string/instruction) + imports for the decompiler CLI#208
Closed
mahaloz wants to merge 1 commit into
Closed
P1: Search (bytes/string/instruction) + imports for the decompiler CLI#208mahaloz wants to merge 1 commit into
mahaloz wants to merge 1 commit into
Conversation
Agents previously had to shell out to nm/strings/objdump/readelf for these.
- New `decompiler search bytes|string|instruction`:
- `bytes` — native byte-pattern search (IDA find_bytes, Ghidra
Memory.findBytes, Binary Ninja find_all_data). angr has no such API.
- `string` — searches the string's bytes via the same path.
- `instruction` — regex over each function's disassembly, client-side,
so it works on every backend (capped by --max).
- New `decompiler imports` — enumerate imported symbols (IDA import
modules, angr cle loader, Binary Ninja imported-function symbols;
Ghidra returns not-implemented for now).
- Interface search_bytes / list_imports (base raises NotImplementedError)
with per-backend overrides + client proxies.
- Tests: search bytes/string (ELF magic, SOSNEAKY), instruction (call),
imports (libc symbols). IDA + Ghidra full; angr skips byte-search,
runs instruction + imports. SKILL.md / docs updated.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HfZHdprXg38re1XyKxzGg5
Member
Author
|
Integrated into |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Without these, agents fall back to
nm,strings,objdump,readelf. This brings byte/string/instruction search and import enumeration into the CLI.New capabilities
decompiler search bytes|string|instructionbytes— native byte-pattern search: IDAfind_bytes, GhidraMemory.findBytes, Binary Ninjafind_all_data. (angr has no byte-search API → exit2.)string— the string's bytes via the same path.instruction— regex over each function's disassembly, client-side, so it works on every backend (bounded by--max).decompiler imports— imported symbols: IDA import modules, angr cle loader, Binary Ninja imported-function symbols. (Ghidra →not implementedfor now.)search_bytes/list_imports(base raisesNotImplementedError) with per-backend overrides + client proxies.Example
Tests
Backend-parametrized:
test_search_bytes_elf_magic,test_search_string,test_search_instruction,test_imports_list.findBytes), imports skips (unsupported). angr: instruction + imports pass, byte-search skips.Support matrix
Fifth PR in the IDALib-parity series. Based on
feat/cli-typed-reads(#207).🤖 Generated with Claude Code
https://claude.ai/code/session_01HfZHdprXg38re1XyKxzGg5