{
  "added_at": "2026-11-02",
  "additional_evidence_urls": [
    "https://github.com/HackOvert/GhidraSnippets/blob/9bcd718e8958387ff5695194b83a52df4e0a3de7/LICENSE",
    "https://github.com/HackOvert/GhidraSnippets/commit/643bbee5d287c79cb92d93112f89346ce3023a1f"
  ],
  "category": "learning",
  "description_en": "A single-page collection of 30 commented Python examples for scripting Ghidra, grouped by task: projects, programs, functions and cross-references, basic blocks, instructions, stack variables, decompiler output, comments, P-code emulation and dumps, call graphs and program slices. It starts from the Flat Program, Flat Decompiler and Flat Debugger APIs, then shows where a task needs Ghidra's fuller API; most snippets include an example of their output.",
  "description_zh": "单页汇集 30 个带注释的 Ghidra Python 脚本示例，按任务分组：项目、程序、函数与交叉引用、基本块、指令、栈变量、反编译输出、注释、P-code 模拟与导出、调用图和程序切片。示例从 Flat Program、Flat Decompiler 和 Flat Debugger API 入手，再说明哪些任务需要 Ghidra 更完整的 API；大多数示例附有输出样例。",
  "entry_url": "https://awesomerea.org/resources/ghidra-snippets/",
  "entry_url_zh": "https://awesomerea.org/zh/resources/ghidra-snippets/",
  "evidence_url": "https://github.com/HackOvert/GhidraSnippets/blob/9bcd718e8958387ff5695194b83a52df4e0a3de7/README.md",
  "group": "learn",
  "id": "ghidra-snippets",
  "json_url": "https://awesomerea.org/resources/ghidra-snippets/record.json",
  "kind": "learning-resource",
  "markdown_url": "https://awesomerea.org/resources/ghidra-snippets/index.md",
  "markdown_url_zh": "https://awesomerea.org/zh/resources/ghidra-snippets/index.md",
  "name": "Ghidra Snippets",
  "name_zh": "Ghidra Snippets Ghidra 脚本示例集",
  "record_type": "resource",
  "relationship": "learning",
  "requirements": [
    "Everything is in one README, with no script files or releases. The last change, on 2023-07-19, fixed a typo; the one before, on 2022-11-09, added Flat API notes for Ghidra 10.2. Version remarks range from Ghidra 9.1 and 9.2.2 to 10.2, so names and behavior in current Ghidra releases may differ; the README points to Ghidra's built-in API help and to the ghidra.re online docs, which it says may not be up to date.",
    "The examples run in Ghidra's Python scripting environment, which the README calls the Jython console, against a program the user has loaded. Plotting a function AST also needs GraphViz's dot plus networkx and pydot importable from Jython, and the README notes that Python modules with native code do not work there. Compatibility with PyGhidra or Python 3 is not stated.",
    "Released under CC0 1.0. The README calls the snippets a verbose mashup with more than one way to do each task and invites pull requests."
  ],
  "requirements_zh": [
    "全部内容都在一个 README 中，没有脚本文件或发布版本。最近一次修改在 2023-07-19，修正了一处笔误；再上一次在 2022-11-09，补充了 Ghidra 10.2 的 Flat API 说明。文中的版本说明从 Ghidra 9.1、9.2.2 到 10.2 不等，因此在当前 Ghidra 版本中的名称和行为可能不同；README 建议查阅 Ghidra 内置的 API 帮助以及 ghidra.re 在线文档，并说明后者可能不是最新。",
    "示例在 Ghidra 的 Python 脚本环境中运行（README 称之为 Jython 控制台），针对使用者已载入的程序。绘制函数 AST 还需要 GraphViz 的 dot，以及能在 Jython 中导入的 networkx 和 pydot；README 指出含原生代码的 Python 模块无法在其中使用。未说明是否兼容 PyGhidra 或 Python 3。",
    "以 CC0 1.0 发布。README 称这些示例刻意写得冗长、只是拼凑出来完成任务，每项任务都有不止一种做法，并欢迎提交拉取请求。"
  ],
  "targets": [
    "binary"
  ],
  "url": "https://github.com/HackOvert/GhidraSnippets",
  "verification": "source-reviewed",
  "verified_at": "2026-10-20"
}
