{
  "added_at": "2026-11-03",
  "additional_evidence_urls": [
    "https://github.com/0cyn/ktool/blob/faed829b838dc4060b7e36f90239a52cd37f2a45/pyproject.toml",
    "https://github.com/0cyn/ktool/blob/faed829b838dc4060b7e36f90239a52cd37f2a45/src/ktool/ktool_script.py",
    "https://github.com/0cyn/ktool/tree/faed829b838dc4060b7e36f90239a52cd37f2a45/tests/src",
    "https://github.com/0cyn/ktool/blob/faed829b838dc4060b7e36f90239a52cd37f2a45/tests/build.ninja",
    "https://github.com/0cyn/ktool/blob/faed829b838dc4060b7e36f90239a52cd37f2a45/.github/workflows/tests.yml",
    "https://github.com/0cyn/ktool/blob/faed829b838dc4060b7e36f90239a52cd37f2a45/LICENSE",
    "https://github.com/0cyn/ktool/blob/faed829b838dc4060b7e36f90239a52cd37f2a45/EXTERNAL_LICENSES/README.md",
    "https://github.com/0cyn/ktool/releases/tag/2.0.0",
    "https://pypi.org/project/k2l/2.0.0/",
    "https://github.com/0cyn/ktool/actions/runs/22801141527"
  ],
  "category": "native-analysis",
  "description_en": "Pure-Python toolkit for static Mach-O and Objective-C analysis, used as the ktool command line, a terminal browser (ktool open) or a library, with no compiled dependencies. Its commands print load commands, linked libraries, symbol tables, imports and exports, Objective-C classes and protocols, Swift types, function starts and code-signing entitlements, and dump reconstructed Objective-C headers or .tbd stubs. It can also list and extract kexts from kernel caches, split and combine fat binaries, change install names and insert load commands.",
  "description_zh": "纯 Python 编写的 Mach-O 与 Objective-C 静态分析工具包，可作为 ktool 命令行、终端浏览界面（ktool open）或程序库使用，没有需要编译的依赖。其命令可列出加载命令、链接库、符号表、导入与导出符号、Objective-C 类和协议、Swift 类型、函数起始地址以及代码签名权限（entitlements），并可导出重建的 Objective-C 头文件或 .tbd 存根。它还能列出并提取内核缓存中的 kext，拆分和合并 fat 二进制文件，修改安装名并插入加载命令。",
  "entry_url": "https://awesomerea.org/resources/ktool/",
  "entry_url_zh": "https://awesomerea.org/zh/resources/ktool/",
  "evidence_url": "https://github.com/0cyn/ktool/blob/faed829b838dc4060b7e36f90239a52cd37f2a45/README.md",
  "group": "tools",
  "id": "ktool",
  "json_url": "https://awesomerea.org/resources/ktool/record.json",
  "kind": "tool",
  "markdown_url": "https://awesomerea.org/resources/ktool/index.md",
  "markdown_url_zh": "https://awesomerea.org/zh/resources/ktool/index.md",
  "name": "ktool",
  "name_zh": "ktool Mach-O 与 Objective-C 分析工具包",
  "record_type": "resource",
  "relationship": "foundation",
  "requirements": [
    "Latest PyPI release at review: k2l 2.0.0, uploaded 2024-01-10 and also tagged on GitHub. The reviewed master head of 2026-03-07 declares version 2.1.2 in pyproject.toml, which has not been published. The README marks the terminal GUI as still in active development and lists file and img4 utilities that the reviewed command parser does not define.",
    "Install with pip install k2l: the package requires Python 3.6.2 or later, depends on Pygments and adds windows-curses on Windows. The README reports running it on Windows, macOS, Linux (including ARM64), iOS through iSH, Android through Termux, WebAssembly and Brython. Unless KTOOL_NO_UPDATE_CHECK is set, each run asks PyPI for a newer k2l in a background thread.",
    "Inputs are Mach-O files, fat binaries or kernel caches the user supplies; the repository commits no Mach-O binaries. tests/src holds two small Objective-C test sources, an entitlements plist and libSystem.tbd, a text-based stub of the watchOS libSystem export list of the kind found in Apple's SDKs, used to link the arm64_32 test build; tests/build.ninja compiles the test binaries locally with Xcode's clang, lipo and codesign.",
    "The macOS GitHub Actions workflow builds those test binaries, runs tests/unit.py and exercises the insert, edit, lipo, dump and symbols commands; its run on the reviewed commit failed.",
    "MIT (LICENSE, copyright 2021 _kritanta). EXTERNAL_LICENSES notes that the chained-fixup code is based on the author's code for Binary Ninja's Mach-O view plugin and includes an Apache-2.0 license for it."
  ],
  "requirements_zh": [
    "审阅时 PyPI 上的最新版本为 k2l 2.0.0，上传于 2024-01-10，GitHub 上也有对应标签。所审 master 分支 2026-03-07 的最新提交在 pyproject.toml 中声明版本 2.1.2，该版本尚未发布。README 注明终端图形界面仍在积极开发中，还列出了 file 和 img4 工具，但所审的命令解析代码中并未定义这两个命令。",
    "用 pip install k2l 安装：该包要求 Python 3.6.2 或更高版本，依赖 Pygments，在 Windows 上还会安装 windows-curses。README 称可在 Windows、macOS、Linux（含 ARM64）、通过 iSH 运行的 iOS、通过 Termux 运行的 Android、WebAssembly 和 Brython 上运行。除非设置 KTOOL_NO_UPDATE_CHECK，每次运行都会在后台线程中向 PyPI 查询是否有更新的 k2l。",
    "输入是使用者自行提供的 Mach-O 文件、fat 二进制文件或内核缓存；仓库未提交任何 Mach-O 二进制文件。tests/src 中有两个小型 Objective-C 测试源码、一个权限 plist，以及 libSystem.tbd——这是 Apple SDK 中常见的那类文本存根，列出 watchOS libSystem 的导出符号，用于链接 arm64_32 测试构建；tests/build.ninja 在本地用 Xcode 的 clang、lipo 和 codesign 编译测试二进制文件。",
    "macOS 上的 GitHub Actions 工作流会构建这些测试二进制文件，运行 tests/unit.py，并测试 insert、edit、lipo、dump 和 symbols 命令；它在所审提交上的运行结果为失败。",
    "MIT（LICENSE，版权 2021 _kritanta）。EXTERNAL_LICENSES 说明链式修复（chained fixup）代码基于作者为 Binary Ninja 的 Mach-O 视图插件编写的代码，并附有相应的 Apache-2.0 许可证。"
  ],
  "targets": [
    "app",
    "binary"
  ],
  "url": "https://github.com/0cyn/ktool",
  "verification": "source-reviewed",
  "verified_at": "2026-10-27"
}
