grep
Search ghidrasql entities by name or pattern across functions, symbols, imports, exports, types, and strings.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Search ghidrasql entities by name or pattern across functions, symbols, imports, exports, types, and strings.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | grep |
| description | Search ghidrasql entities by name or pattern across functions, symbols, imports, exports, types, and strings. |
| allowed-tools | ["Bash","Read","Glob","Grep"] |
ghidrasql does not have a grep() SQL function or a grep table — this skill is purely about applying SQLite LIKE patterns against the right entity table. The skill name reflects intent, not a special surface.
Use this skill when the user asks to:
Route to:
xrefs once a target symbol is founddecompiler when the next step is reading a functiontypes when the target is a type or member namedata when searching strings (strings.content LIKE ...)SQLite's LIKE is case-insensitive by default (PRAGMA case_sensitive_like defaults to off). % matches any substring, _ matches a single character. For literal % or _, escape with ESCAPE '\' (the escape argument must be exactly one character; SQLite does not interpret C-style backslash escapes inside string literals, so '\\' is a two-character string and is rejected):
SELECT name FROM funcs WHERE name LIKE '%a\_b%' ESCAPE '\';
For regex-shape matching, SQLite has REGEXP only if a regex extension is loaded — ghidrasql does not load one. Use LIKE patterns or fall back to substring tests with INSTR(...).
Function name search:
SELECT name, printf('0x%X', addr) AS addr
FROM funcs
WHERE name LIKE '%config%'
ORDER BY name
LIMIT 50;
Symbol search (namespace carries the Ghidra namespace path — Global, kernel32.dll, etc.):
SELECT printf('0x%X', addr) AS addr, name, namespace, symbol_kind
FROM names
WHERE name LIKE '%socket%'
ORDER BY name
LIMIT 50;
Imports:
SELECT printf('0x%X', addr) AS addr, name, module
FROM imports
WHERE name LIKE '%Crypt%'
ORDER BY name;
If SELECT COUNT(*) FROM imports; returns 0 (some PE binaries — packed, stripped, unusual — leave imports empty and surface IAT entries as data_items):
SELECT printf('0x%X', addr) AS addr, name
FROM data_items
WHERE name LIKE 'PTR_%Crypt%'
ORDER BY name;
Use this fallback whenever imports is empty but the binary clearly imports OS APIs.
Exports:
SELECT printf('0x%X', addr) AS addr, name
FROM entries
WHERE name LIKE '%Init%'
ORDER BY name;
Type names:
SELECT name, kind
FROM types
WHERE name LIKE '%Context%'
ORDER BY name;
Type members across all parents:
SELECT parent_type_name, member_name, member_type
FROM type_members
WHERE member_name LIKE '%handle%'
ORDER BY parent_type_name, member_name;
Strings (route to data skill for the full surface):
SELECT printf('0x%X', addr) AS addr, content
FROM strings
WHERE content LIKE '%license%'
LIMIT 30;
For "find every entity matching X across functions, symbols, types, and strings", the jump_entities view is a unified entity catalog you can pattern-match against:
SELECT kind, name, addr
FROM jump_entities
WHERE name LIKE '%Crypt%'
ORDER BY kind, name
LIMIT 50;
For full-text relevance ranking, use the search_* SQL functions (see the functions skill):
SELECT name, search_score(name, 'crypt context') AS score
FROM funcs
WHERE search_match(name, 'crypt context') = 1
ORDER BY score DESC
LIMIT 20;
grep() function and no grep table. Anything that looked like one in older docs is just a WHERE name LIKE '...' query; use the catalogs above.PRAGMA case_sensitive_like = 1; first (per session).Analyze binaries with ghidrasql using safe, high-signal query patterns.
Apply persistent ghidrasql annotations such as names, comments, signatures, and local-variable edits.
Connect to ghidrasql sources, verify live access, and route to the right analysis skill.
Query strings, bytes, data items, memory blocks, and relocations through ghidrasql.
Manage breakpoints and patch bytes through ghidrasql — the breakpoints table and bytes single-byte UPDATE.
Decompile functions with ghidrasql and work with pseudocode, locals, parameters, and ctree pattern views safely.