Name | headless-ida JSON |
Version |
0.6.1
JSON |
| download |
home_page | None |
Summary | Headless IDA |
upload_time | 2024-10-13 15:53:44 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3 |
license | MIT License Copyright (c) 2023 Han Dai Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
ida
headless
idapro
hexrays
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<p align="center">
<img alt="Headless IDA" src="https://raw.githubusercontent.com/DennyDai/headless-ida/main/headless-ida.png" width="128">
</p>
<h1 align="center">Headless IDA</h1>
[![Latest Release](https://img.shields.io/pypi/v/headless-ida.svg)](https://pypi.python.org/pypi/headless-ida/)
[![PyPI Statistics](https://img.shields.io/pypi/dm/headless-ida.svg)](https://pypistats.org/packages/headless-ida)
[![License](https://img.shields.io/github/license/DennyDai/headless-ida.svg)](https://github.com/DennyDai/headless-ida/blob/main/LICENSE)
# Install
```bash
pip install headless-ida
```
# Usage
### Use it as a normal Python module.
```python
# Initialize HeadlessIda
from headless_ida import HeadlessIda
headlessida = HeadlessIda("/path/to/idat64", "/path/to/binary")
# Import IDA Modules (make sure you have initialized HeadlessIda first)
import idautils
import ida_name
# Or Import All IDA Modules at Once (idaapi is not imported by default)
# from headless_ida.ida_headers import *
# Have Fun
for func in idautils.Functions():
print(f"{hex(func)} {ida_name.get_ea_name(func)}")
```
### Use it as a command line tool.
```bash
# Interactive Console
$ headless-ida /path/to/idat64 /path/to/binary
Python 3.8.10 (default, Nov 14 2022, 12:59:47)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import idautils
>>> list(idautils.Functions())[0:10]
[16384, 16416, 16432, 16448, 16464, 16480, 16496, 16512, 16528, 16544]
>>>
# Run IDAPython Script
$ headless-ida /path/to/idat64 /path/to/binary idascript.py
# One-liner
$ headless-ida /path/to/idat64 /path/to/binary -c "import idautils; print(list(idautils.Functions())[0:10])"
# In case you like IPython
$ headless-ida /path/to/idat64 /path/to/binary -c "import IPython; IPython.embed();"
```
# Advanced Usage
## Remote Server
### Start a Headless IDA server
```bash
$ headless-ida-server /path/to/idat64 localhost 1337 &
```
### Connect to the server in Python script
```python
# Initialize HeadlessIda
from headless_ida import HeadlessIdaRemote
headlessida = HeadlessIdaRemote("localhost", 1337, "/path/to/local/binary")
# Import IDA Modules (make sure you have initialized HeadlessIda first)
import idautils
import ida_name
# Have Fun
for func in idautils.Functions():
print(f"{hex(func)} {ida_name.get_ea_name(func)}")
```
### Connect to the server in command line
```bash
# Interactive Console
$ headless-ida localhost:1337 /path/to/local/binary
# Run IDAPython Script
$ headless-ida localhost:1337 /path/to/local/binary idascript.py
# One-liner
$ headless-ida localhost:1337 /path/to/local/binary -c "import idautils; print(list(idautils.Functions())[0:10])"
```
# Resources
- [Headless IDA Examples](https://github.com/DennyDai/headless-ida/tree/main/examples)
- [IDAPython Official Documentation](https://www.hex-rays.com/products/ida/support/idapython_docs/)
- [IDAPython Official Examples](https://github.com/idapython/src/tree/master/examples)
# Known Issues
### `from XXX import *`
- 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`.
- 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.
Raw data
{
"_id": null,
"home_page": null,
"name": "headless-ida",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3",
"maintainer_email": null,
"keywords": "ida, headless, idapro, hexrays",
"author": null,
"author_email": "Han Dai <pypi@han.do>",
"download_url": "https://files.pythonhosted.org/packages/48/52/f320fbd89c3c29930ec247179f83768ee59709891c34d44f9562674c707e/headless_ida-0.6.1.tar.gz",
"platform": null,
"description": "<p align=\"center\">\n <img alt=\"Headless IDA\" src=\"https://raw.githubusercontent.com/DennyDai/headless-ida/main/headless-ida.png\" width=\"128\">\n</p>\n<h1 align=\"center\">Headless IDA</h1>\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### 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>>> import idautils\n>>> list(idautils.Functions())[0:10]\n[16384, 16416, 16432, 16448, 16464, 16480, 16496, 16512, 16528, 16544]\n>>> \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 &\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://www.hex-rays.com/products/ida/support/idapython_docs/)\n- [IDAPython Official Examples](https://github.com/idapython/src/tree/master/examples)\n\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",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2023 Han Dai Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Headless IDA",
"version": "0.6.1",
"project_urls": {
"documentation": "https://github.com/DennyDai/headless-ida",
"homepage": "https://github.com/DennyDai/headless-ida",
"repository": "https://github.com/DennyDai/headless-ida"
},
"split_keywords": [
"ida",
" headless",
" idapro",
" hexrays"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b5fbf3f42f64500c4b2330ea5010d974e419310b092faa089673551632e839bc",
"md5": "560cc668ab9f19e2fe61c968686b500f",
"sha256": "e004b905a9e168e6169288076b736c093eb8600c27e0e466a0c4a956b8c4aa6b"
},
"downloads": -1,
"filename": "headless_ida-0.6.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "560cc668ab9f19e2fe61c968686b500f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3",
"size": 10346,
"upload_time": "2024-10-13T15:53:43",
"upload_time_iso_8601": "2024-10-13T15:53:43.012277Z",
"url": "https://files.pythonhosted.org/packages/b5/fb/f3f42f64500c4b2330ea5010d974e419310b092faa089673551632e839bc/headless_ida-0.6.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4852f320fbd89c3c29930ec247179f83768ee59709891c34d44f9562674c707e",
"md5": "58154269534606b2d13cc226150836df",
"sha256": "f3a2889cfb163afd5db30ae319ed21a4af970712834f9e0b4668e2dc64ed4ba2"
},
"downloads": -1,
"filename": "headless_ida-0.6.1.tar.gz",
"has_sig": false,
"md5_digest": "58154269534606b2d13cc226150836df",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3",
"size": 174327,
"upload_time": "2024-10-13T15:53:44",
"upload_time_iso_8601": "2024-10-13T15:53:44.385169Z",
"url": "https://files.pythonhosted.org/packages/48/52/f320fbd89c3c29930ec247179f83768ee59709891c34d44f9562674c707e/headless_ida-0.6.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-13 15:53:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "DennyDai",
"github_project": "headless-ida",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "headless-ida"
}