{"id":13720663,"url":"https://github.com/ant4g0nist/polar","last_synced_at":"2025-10-25T10:30:47.282Z","repository":{"id":64638523,"uuid":"575803618","full_name":"ant4g0nist/polar","owner":"ant4g0nist","description":"A LLDB plugin which brings LLMs to LLDB","archived":false,"fork":false,"pushed_at":"2023-11-16T10:50:00.000Z","size":1070,"stargazers_count":129,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-17T11:32:07.151Z","etag":null,"topics":["langchain","llama2","lldb","llm","ollama","reverse-engineering"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ant4g0nist.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}},"created_at":"2022-12-08T10:34:17.000Z","updated_at":"2025-05-04T03:32:04.000Z","dependencies_parsed_at":"2023-11-16T11:39:00.150Z","dependency_job_id":"3a2215bf-9c39-4882-a948-397bb9e0ae02","html_url":"https://github.com/ant4g0nist/polar","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ant4g0nist/polar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ant4g0nist%2Fpolar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ant4g0nist%2Fpolar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ant4g0nist%2Fpolar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ant4g0nist%2Fpolar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ant4g0nist","download_url":"https://codeload.github.com/ant4g0nist/polar/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ant4g0nist%2Fpolar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280862719,"owners_count":26404171,"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","status":"online","status_checked_at":"2025-10-24T02:00:06.418Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["langchain","llama2","lldb","llm","ollama","reverse-engineering"],"created_at":"2024-08-03T01:01:06.556Z","updated_at":"2025-10-25T10:30:46.924Z","avatar_url":"https://github.com/ant4g0nist.png","language":"Python","funding_links":[],"categories":["Languages"],"sub_categories":["Python"],"readme":"# Polar\nLLDB plugin which queries OpenAI's davinci-003 language model to speed up reverse-engineering. Treat it like an extension of Lisa.py, an Exploit Dev Swiss Army Knife.\n\nAt the moment, it can ask `davinci-003` to explain what the current disassembly does. Here is a simple example of what results it can provide:\n\n![Sample](./imgs/explain0x1.png) \n\n## Installation\n```\ncurl -OL https://raw.githubusercontent.com/ant4g0nist/polar/master/polar.py\nmv polar.py ~/polar.py\n# Install Capstone\n\n\npip3 install capstone openai Pygments\necho command script import ~/polar.py \u003e\u003e ~/.lldbinit\n```\n\n\n## Usage\nCurrently, you can use polar either with Ollama or OpenAI ChatGPT.\n\n### Ollama or OpenAI ChatGPT\n#### Ollama\nUsing Ollama with Polar, now we can get up and running `Polar` with large language models, locally.\n\n#### OpenAI ChatGPT\nIf you are ok paying for the usage of OpenAI's API, and do not mind sharing the disassembly of your target binary with OpenAI, you can use the `ChatGPT` model to get results.\n\n### Configuring Ollama\nFollow the instructions from [ollama](https://ollama.ai/) to install the `ollama` binary. Once you have installed `ollama`, you can configure `polar` to your favorite language model, either `codellama` or `llama2`.\n\nIf you want to use `codellama`, run this once to download the model\n```bash\nollama run codellama\n```\n\nor if you want to use `llama2`, run this once to download the model\n```bash\nollama run llama2\n```\n\n```bash\nexport LISA_OLLAMA_MODEL=codellama\nexport LISA_CHANNEL=ollama\nlldb\n(lldb) command script import ~/polar.py\n```\n\n### Configuring OpenAI ChatGPT\n\nYou need to set OPENAI_API_KEY env variable. You can obtain your openai token from : [Openai api-keys](https://beta.openai.com/account/api-keys)\n\n```sh\nexport OPENAI_API_KEY=\u003cyour openai api token here\u003e.\n```\n\n### Using Polar\n\n```\nlldb\n(lldb) command script import ~/polar.py\n(lldb) help explain\n(lldb) help decompile\n```\n\n![explain0x0](./imgs/explain0x0.png)\n\n![decompile0x1](./imgs/decompile0x1.png)\n\n![suggest0x1](./imgs/suggest0x1.png)\n\n## Example:\n\n![Sample](./imgs/explain0x1.png) \n\n## TODO\n- [x] Add support for Langchain for Ollama\n- [ ] Extend !exploitable command to use AI for analysis\n\n## Acknowledgements\n\n- Thanks to [JusticeRage](https://twitter.com/JusticeRage) for [Gepetto](https://github.com/JusticeRage/Gepetto)\n- Thanks to [Ollama](https://github.com/jmorganca/ollama), Meta for llama2/codelama, [OpenAI](https://openai.com)\n- [lldb](https://lldb.llvm.org/)\n- [lisa.py](https://github.com/ant4g0nist/lisa.py)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fant4g0nist%2Fpolar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fant4g0nist%2Fpolar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fant4g0nist%2Fpolar/lists"}