{"id":22751028,"url":"https://github.com/dennydai/headless-ida","last_synced_at":"2025-04-12T21:28:26.135Z","repository":{"id":148982435,"uuid":"611959957","full_name":"DennyDai/headless-ida","owner":"DennyDai","description":"Run IDA scripts headlessly.","archived":false,"fork":false,"pushed_at":"2024-12-19T19:30:26.000Z","size":292,"stargazers_count":140,"open_issues_count":0,"forks_count":15,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-04T02:01:44.476Z","etag":null,"topics":["headless","hexrays","ida","ida-pro","idapro","idapython","linux","python","windows"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/headless-ida/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DennyDai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-09T22:38:23.000Z","updated_at":"2025-03-25T14:27:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"7a278780-1c3f-4eb4-94c4-3c792e327ee9","html_url":"https://github.com/DennyDai/headless-ida","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DennyDai%2Fheadless-ida","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DennyDai%2Fheadless-ida/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DennyDai%2Fheadless-ida/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DennyDai%2Fheadless-ida/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DennyDai","download_url":"https://codeload.github.com/DennyDai/headless-ida/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248633951,"owners_count":21136951,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["headless","hexrays","ida","ida-pro","idapro","idapython","linux","python","windows"],"created_at":"2024-12-11T04:19:38.497Z","updated_at":"2025-04-12T21:28:26.107Z","avatar_url":"https://github.com/DennyDai.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Headless IDA\" src=\"https://raw.githubusercontent.com/DennyDai/headless-ida/main/headless-ida.png\" width=\"128\"\u003e\n\u003c/p\u003e\n\u003ch1 align=\"center\"\u003eHeadless IDA\u003c/h1\u003e\n\n[![Latest Release](https://img.shields.io/pypi/v/headless-ida.svg)](https://pypi.python.org/pypi/headless-ida/)\n[![PyPI Statistics](https://img.shields.io/pypi/dm/headless-ida.svg)](https://pypistats.org/packages/headless-ida)\n[![License](https://img.shields.io/github/license/DennyDai/headless-ida.svg)](https://github.com/DennyDai/headless-ida/blob/main/LICENSE)\n\n# Install\n```bash\npip install headless-ida\n```\n\n# Usage\n\n\u003e [!TIP]\n\u003e Headless IDA supports the latest [idalib](https://docs.hex-rays.com/user-guide/idalib). Just provide the idalib path instead of idat64 to use it as the backend.\n\n### Use it as a normal Python module.\n```python\n# Initialize HeadlessIda\nfrom headless_ida import HeadlessIda\nheadlessida = HeadlessIda(\"/path/to/idat64\", \"/path/to/binary\")\n\n# Import IDA Modules (make sure you have initialized HeadlessIda first)\nimport idautils\nimport ida_name\n\n# Or Import All IDA Modules at Once (idaapi is not imported by default)\n# from headless_ida.ida_headers import *\n\n# Have Fun\nfor func in idautils.Functions():\n    print(f\"{hex(func)} {ida_name.get_ea_name(func)}\")\n```\n\n### Use it as a command line tool.\n```bash\n# Interactive Console\n$ headless-ida /path/to/idat64 /path/to/binary\nPython 3.8.10 (default, Nov 14 2022, 12:59:47) \n[GCC 9.4.0] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n(InteractiveConsole)\n\u003e\u003e\u003e import idautils\n\u003e\u003e\u003e list(idautils.Functions())[0:10]\n[16384, 16416, 16432, 16448, 16464, 16480, 16496, 16512, 16528, 16544]\n\u003e\u003e\u003e \n\n\n# Run IDAPython Script\n$ headless-ida /path/to/idat64 /path/to/binary idascript.py\n\n\n# One-liner\n$ headless-ida /path/to/idat64 /path/to/binary -c \"import idautils; print(list(idautils.Functions())[0:10])\"\n\n\n# In case you like IPython\n$ headless-ida /path/to/idat64 /path/to/binary -c \"import IPython; IPython.embed();\"\n```\n\n# Advanced Usage\n## Remote Server\n\n### Start a Headless IDA server\n```bash\n$ headless-ida-server /path/to/idat64 localhost 1337 \u0026\n```\n\n### Connect to the server in Python script\n```python\n# Initialize HeadlessIda\nfrom headless_ida import HeadlessIdaRemote\nheadlessida = HeadlessIdaRemote(\"localhost\", 1337, \"/path/to/local/binary\")\n\n# Import IDA Modules (make sure you have initialized HeadlessIda first)\nimport idautils\nimport ida_name\n\n# Have Fun\nfor func in idautils.Functions():\n    print(f\"{hex(func)} {ida_name.get_ea_name(func)}\")\n```\n\n### Connect to the server in command line\n```bash\n# Interactive Console\n$ headless-ida localhost:1337 /path/to/local/binary\n# Run IDAPython Script\n$ headless-ida localhost:1337 /path/to/local/binary idascript.py\n# One-liner\n$ headless-ida localhost:1337 /path/to/local/binary -c \"import idautils; print(list(idautils.Functions())[0:10])\"\n```\n\n\n# Resources\n- [Headless IDA Examples](https://github.com/DennyDai/headless-ida/tree/main/examples)\n- [IDAPython Official Documentation](https://docs.hex-rays.com/developer-guide/idapython)\n- IDAPython Official Examples: [1](https://docs.hex-rays.com/developer-guide/idapython/idapython-examples), [2](https://github.com/idapython/src/tree/master/examples)\n# Known Issues\n### `from XXX import *`\n - Using `from XXX import *` syntax with certain ida modules (like idaapi, ida_ua, etc.) is currently unsupported due to SWIG and RPyC compatibility issues. We recommend importing specific items with `from XXX import YYY, ZZZ`, or importing the entire module using `import XXX`.\n - The issue arises because SWIG, employed for creating Python bindings for C/C++ code, generates intermediary objects (SwigVarlink) that RPyC, our remote procedure call mechanism, cannot serialize or transmit correctly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdennydai%2Fheadless-ida","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdennydai%2Fheadless-ida","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdennydai%2Fheadless-ida/lists"}