{"id":16712894,"url":"https://github.com/hugsy/ida-headless","last_synced_at":"2025-03-23T14:31:51.701Z","repository":{"id":146704236,"uuid":"383908579","full_name":"hugsy/ida-headless","owner":"hugsy","description":"IDA (sort of) headless","archived":false,"fork":false,"pushed_at":"2024-02-17T19:30:59.000Z","size":11,"stargazers_count":23,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-18T21:50:34.952Z","etag":null,"topics":["decompiler","disassembler","ida-pro","python","remoting","rpyc"],"latest_commit_sha":null,"homepage":"","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/hugsy.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":"2021-07-07T19:45:13.000Z","updated_at":"2025-03-03T08:34:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"f0412212-3f62-482e-9cd4-d32d74b8fe23","html_url":"https://github.com/hugsy/ida-headless","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugsy%2Fida-headless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugsy%2Fida-headless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugsy%2Fida-headless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugsy%2Fida-headless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hugsy","download_url":"https://codeload.github.com/hugsy/ida-headless/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245116029,"owners_count":20563267,"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":["decompiler","disassembler","ida-pro","python","remoting","rpyc"],"created_at":"2024-10-12T20:44:28.860Z","updated_at":"2025-03-23T14:31:51.377Z","avatar_url":"https://github.com/hugsy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ida-headless\nIDA (sort of) headless\n\n## Idea\n\nEmbed RPyc in IDA to expose IDA's API externally, by a background thread that runs the TCP server. Also in iPython this\nprovides autocomplete.\n\nProps to https://github.com/vrtadmin/FIRST-plugin-ida/blob/master/first_plugin_ida/first.py#L87\nfor the workaround on the threading issue, for IDA Pro \u003e= 7.2\n\n## Quick start\n\n```python\n\u003e\u003e\u003e import rpyc\n\u003e\u003e\u003e c = rpyc.connect(\"ida.rpyc.server\", 18812)\n#\n# IDA namespace will be in `c.root`\n#\n\u003e\u003e\u003e c.root.idaapi.get_root_filename()\n'ntoskrnl.exe'\n\u003e\u003e\u003e hex( c.root.idc.here() )\n0x140088194\n\u003e\u003e\u003e c.root.idaapi.jumpto( 0x1400881EE )\nTrue\n```\n\nFor more facility, you can alias it:\n```python\n\u003e\u003e\u003e idc = c.root.idc\n```\n\nThen, it becomes super readable\n```python\n\u003e\u003e\u003e idc.jumpto( idc.get_name_ea_simple(\"DriverEntry\") )\nTrue\n\u003e\u003e\u003e idc.set_cmt( idc.here(), \"@hugsy was here\", 1)\nTrue\n```\n\nFor generator objects, you now need to use the wrapper `c.root.iterate()`.\n\nExample:\n```python\n\u003e\u003e\u003e idc = c.root.idc\n\u003e\u003e\u003e idautils = c.root.idautils\n\u003e\u003e\u003e for ea in c.root.iterate( idautils.Functions() ):\n...    print( idc.get_func_name(ea) )\n```\n\nBlame HexRays for making their API more confusing at every release.\n\n## Links\n- https://www.hex-rays.com/products/ida/support/ida74_idapython_no_bc695_porting_guide.shtml\n- Same but for Binary Ninja -\u003e https://github.com/hugsy/binja-headless\n\n## Demo\n\n[![img](https://img.youtube.com/vi/obX2GreSsFU/0.jpg)](https://youtu.be/obX2GreSsFU)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugsy%2Fida-headless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhugsy%2Fida-headless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugsy%2Fida-headless/lists"}