{"id":15015033,"url":"https://github.com/fmagin/angr-cli","last_synced_at":"2025-04-06T12:08:15.247Z","repository":{"id":35006168,"uuid":"136743455","full_name":"fmagin/angr-cli","owner":"fmagin","description":"Repo for various angr ipython features to give it more of a cli feeling","archived":false,"fork":false,"pushed_at":"2025-01-15T17:44:05.000Z","size":14584,"stargazers_count":54,"open_issues_count":0,"forks_count":4,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-30T11:07:38.672Z","etag":null,"topics":["angr","binary-analysis","ipython","jupyter"],"latest_commit_sha":null,"homepage":null,"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/fmagin.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":"2018-06-09T17:15:59.000Z","updated_at":"2025-03-30T06:04:51.000Z","dependencies_parsed_at":"2025-03-02T08:20:33.281Z","dependency_job_id":null,"html_url":"https://github.com/fmagin/angr-cli","commit_stats":{"total_commits":101,"total_committers":8,"mean_commits":12.625,"dds":0.504950495049505,"last_synced_commit":"4d18574363a6f7e60b72ab7851cc3b0b995d515e"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fmagin%2Fangr-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fmagin%2Fangr-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fmagin%2Fangr-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fmagin%2Fangr-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fmagin","download_url":"https://codeload.github.com/fmagin/angr-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247478321,"owners_count":20945266,"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":["angr","binary-analysis","ipython","jupyter"],"created_at":"2024-09-24T19:46:24.959Z","updated_at":"2025-04-06T12:08:15.225Z","avatar_url":"https://github.com/fmagin.png","language":"Python","readme":"# angr CLI\n\n\n![Tests with angr from PyPI](https://github.com/fmagin/angr-cli/workflows/Tests%20with%20angr%20from%20PyPI/badge.svg)\n\nThis Python package is a collection of modules to allow easier interactive use of angr for learning and prototyping angr.\n\nAll features are designed for the use of angr in an interactive environment like an IPython shell or a Jupyter environment (both CLI and Notebook), but some will still work in a simple Python shell or script.\n\nUsing a font that supports Ligatures like [JetBrains Mono](https://www.jetbrains.com/lp/mono/) is recommended to make\nthe output more pleasant to read.\n\n## Install\n\n### PyPi\n\nA stable version is available on PyPi.\n```sh\npip install angrcli\n```\n\n### Dev\n\nIn case you want a development install of this, run this in a folder of your choice (e.g. your `angr-dev` repo) after activating your angr virtual environment\n\n```sh\ngit clone https://github.com/fmagin/angr-cli.git\ncd angr-cli\npip install -e ./\n```\n\n## General Usage\n\nTo import and setup all features:\n\n```python\nimport angrcli.full\n```\n\nThis will take care of importing and registering the plugins.\n\n## Core Features\n\n### State View Plugin\n\nThe Context View plugin allows rendering of a state in a view similiar to that provided by GDB plugins like GEF or pwndbg.\n\n\n#### Usage\n\n```python\nimport angr\n# This line registers the plugin and makes it available on each state\nimport angrcli.plugins.ContextView\nproj = angr.Project(\"/bin/ls\", load_options={\"auto_load_libs\":False})\nstate = proj.factory.entry_state()\n\n# Print the state\nstate.context_view.pprint()\n```\n![Context View](./images/context_view_demo.png)\n\n\n### Interactive Exploration\n\nThe Interactive Exploration is a [Python CMD](https://pymotw.com/2/cmd/) wrapper around a Simulation Manager that provides shortcuts for various common operations, like stepping blocks, running until a symbolic branch or manually selecting successors.\n\nThis can either be used in a script, or inside an IPython shell. The latter allows rapid switching between the wrapper to access the shortcuts and the IPython shell for more complex operations.\n\n\n#### Usage\n```python\nimport angr\nimport angrcli.plugins.ContextView\nfrom angrcli.interaction.explore import ExploreInteractive\nproj = angr.Project(\"/bin/ls\", load_options={\"auto_load_libs\":False})\nstate = proj.factory.entry_state()\n# For quick but less flexible access (state isn't modified)\nstate.explore()\n\n# state.explore() basically just does the following on each call\ne = ExploreInteractive(proj, state)\ne.cmdloop()\n\n```\n\n#### Demo\n\n[![asciicast](https://asciinema.org/a/256289.svg)](https://asciinema.org/a/256289)\n\n## Misc\n\n### AST Preview\n\n`angrcli.ast.rendering` provides `render_ast` which uses graphviz to generate a SVG representation of an AST which can be displayed instead of the `__repr__` method of the AST object.\n\n#### Example\n\n\n```python\nimport claripy\nfrom angrcli.ast.rendering import render_ast\nfrom claripy.ast.bv import BV\nBV._repr_svg_ = lambda self: render_ast(self)._repr_svg_()\nx = claripy.BVS('x', 32)\ny = claripy.BVS('y', 32)\n```\n\n![AST Rendering](./images/ast_rendering.png)\n","funding_links":[],"categories":["Projects :rocket:"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffmagin%2Fangr-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffmagin%2Fangr-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffmagin%2Fangr-cli/lists"}