Commit graph

170 commits

Author SHA1 Message Date
Fish
02c374b5b4
DecompilationCache: Serialization support. (#6624)
Also,

- Refactored variable_kb into kb.dec_variables.

- Spill decompilation cache into RuntimeDb.

- Save decompilation cache into angrDb. Decompilation results can be preserved across runs.

- No longer check in _pb2.py files; they are generated during build.
2026-07-22 03:03:40 -07:00
Kevin Phoenix
f939c5b88c
Enable ruff isort rule (#6452)
* Enable ruff isort rule

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-06-02 14:48:07 -07:00
Kevin Phoenix
05bffd6d9b
Remove linux platform tag override in setup.py (#5596)
* Remove linux platform tag override in setup.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-07-09 17:41:36 -07:00
Kevin Phoenix
eeeb43bfb9
Reorganize native code, fixes #5485 (#5510)
* Reorganize native code

* Rename clean_native to clean

* Update MANIFEST.in

* Rename angr_native.def to unicornlib.def
2025-06-03 12:39:37 -07:00
Kevin Phoenix
356987c0f9
Add Rust SegmnentList implementation (#5434)
* Add experimental Rust SegmnentList implementation

* Add rust to RTD environment

* Fix cargo check

* Add update method to avoid ._list

* Change rust version to latest

* Fix some inconsistencies with original implementation

* Fix iterator

* Fix lint issues

* Disable setuptools_rust check in setup.py

* Fix import

* Use asdf to install rust

* Specify latest version

* Also set the rust version globally

* Revert "Disable setuptools_rust check in setup.py"

This reverts commit 0fd2a4b61c.

* Add a note about rust in the docs
2025-05-12 20:48:17 -07:00
Audrey Dutcher
079a425bf2
Make unicorn truly optional (#5327) 2025-02-24 16:23:23 -07:00
Kevin Phoenix
a3297681f2
Apply B lints (#4795) 2024-08-29 18:59:52 -07:00
Kevin Phoenix
ee464d0338
Adopt from __future__ import annotations (#4790) 2024-08-28 18:31:43 -07:00
Kevin Phoenix
f537f16246
Remove deprecated pkg_resources usage (#4698)
* Remove deprecated pkg_resources usage

* Fix path parts being duplicated
2024-07-01 17:16:43 -07:00
Kevin Phoenix
5cbc3b09fb
Fix low-hanging lint issues (#3777)
* Fix low-hanging lint issues

* Fix some test failures

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix doc warnings

* Fix test_pickle.py

* Fix code-block doc warning

* Try indenting code block

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-02-07 14:34:29 -07:00
zwimer
346b2d883d black 2023-01-12 16:43:51 -07:00
Kevin Phoenix
7a35d5d0a6
Add hook to build native components when using editable_wheel setuptools command (#3535)
* Add hook to build native components when using editable_wheel setuptools command

* Override editable_wheel only if it exists

* Catch ModuleNotFoundError instead of ImportError
2022-10-06 15:02:53 -07:00
Kevin Phoenix
a84ff2a616
Select a make rather than trying all of them (#3361) 2022-06-10 03:09:25 -07:00
Kevin Phoenix
4d19fb2e01 Fix setup.py 2022-04-21 16:58:49 -07:00
Kevin Phoenix
a939e0d6dc Re-add hardcoded platform tag 2022-04-21 16:53:33 -07:00
Kevin Phoenix
d387f71520 Re-add platform tag to setup.py 2022-04-20 15:26:12 -07:00
Kevin Phoenix
8f1d0cf3dd
Split pyvex and unicorn errors in setup.py (#3294) 2022-04-11 14:16:43 -07:00
Kevin Phoenix
1c055cf1e2
Use setup.cfg (#3221)
* Use setup.cfg

* Fix lint
2022-04-08 14:02:29 -07:00
Matt Borgerson
2abde0d6ea Update pypcode dep to 1.0.5 2022-03-29 22:53:50 -07:00
Kevin Phoenix
dcaf3b302d
Revert to distutils build (#3240)
* Revert to distutils build

* Implement custom develop to call build
2022-03-29 14:59:43 -07:00
Fish
8359211a18 Skip capstone 5.0.0rc2 since insn_name() is broken for THUMB nops. 2022-03-27 14:45:48 -07:00
Kevin Phoenix
7d0880a4b0 Update version to 9.2.0.dev0 [ci skip] 2022-03-23 19:09:56 -07:00
Kevin Phoenix
a8eeb4968f
Add pyproject.toml (#3193) 2022-03-16 17:36:57 -07:00
Kevin Phoenix
d8788df8a9
Remove automatic platform tag on Linux (#3187) 2022-03-16 13:14:56 -07:00
Kevin Phoenix
b2a0fb6e93
Pin progressbar2 to version 3 and up (#3186)
* Pin progressbar2 to version 4 and up

* Pin progressbar2 to version 3 and up
2022-03-15 16:25:22 -07:00
Fish
2bb16e4d85
Structurer: Stronger condition simplifiers for better readability. Close #2975. (#3013)
* Structurer: Stronger condition simplifiers for better readability after structuring.

* Eliminate TagsAnnotation. Use the right tool (sympy) to simplify boolean expressions.

* Support all comparisons.

* Lint the code.

* oops
2021-12-14 14:15:24 -07:00
Audrey Dutcher
b35ad640be Bump minor version to 9.1 2021-12-12 22:26:06 -07:00
mborgerson
bd89ce4fcf
Add function, block pretty-printing (#2964)
* Add format callback in DisassemblyAnalysis

* Add function pretty-printing

* Check for TTY before emitting ANSI color sequences

If on Windows, use `colorama` package to translate ANSI escape sequences
to appropriate terminal API calls.

* Push pretty-printing logic into DisassemblyAnalysis

* Support disassembly of ranges

* Pretty-print block disassembly

* Add option to display instruction bytes

* Add more compatible arrow glyph

* Turn off bytes by default, reduce bytes per line to 5

* Detect stdout encoding for ASCII fallback

* Fix comment wrapping

* Passthru ascii_only option

* Use extended ANSI control sequences for bright colors

Apparently macOS terminal doesn't render 1 types as bright

* Cleanup minor issues in edge formatting loop
2021-11-09 13:39:48 -07:00
Fish
c93d36514b
FLIRT support (#2692)
* Preliminary FLIRT support.

* Add the missing newline.

* Get rid of the optional import of nampa.

* Re-enable _IO_file_open.

* Add build_sig.py

* Add code for batch-loading FLIRT signatures.

* Update build_sig.py

* Support loading multiple FLIRT signatures into angr.

* CompleteCallingConventions: Allow skipping signature-matched functions.

* Unify the use of MemoryDataSort. Fix Function serialization.

* oops

* Lint the code.

* Lint the code again.
2021-07-07 04:10:01 -07:00
mborgerson
06561b21bd
Add archinfo classes for all supported P-code architectures (#2787)
* setup.py: Update pypcode version to 1.0.2

* pcode: Create archinfo-compatible definitions from SLEIGH specs
2021-06-30 15:36:19 -07:00
mborgerson
df494e8a96
Update p-code engine to match new pypcode API (#2592)
* Update p-code engine to match new pypcode API

* Remove return type annotation on constructors
2021-04-08 00:00:02 -07:00
mborgerson
b8c43fc986
Add new engine based on Ghidra's P-Code IR (#2328)
This patch adds a new engine to angr that uses Ghidra's P-Code
intermediate representation. Lifting is handled by the SLEIGH library,
with bindings to Python via pypcode. Symbolic execution is supported for
a majority of ops.
2020-10-25 18:54:13 -07:00
Mateusz Piotrowski
44748a8e8a Try to use gmake before falling back to make
On some platforms (like FreeBSD) make is not GNU make, which is the make
used by the angr project. This patch makes it easier to find the desired
make binary.
2020-09-24 15:54:48 -07:00
Fish
2312b23a18 Pin to unicorn 1.0.2rc4 since rc5 breaks many things. 2020-09-24 08:47:37 -07:00
angr bot
77f137c1da Update version to 9.0.gitrolling 2020-09-16 18:16:08 -07:00
Fish
8f022a0a03 Add minimum version requirement for protobuf. Fix #2290. 2020-08-11 13:39:42 -07:00
angr release bot
bd3edf5758 ticked version number to 8.20.7.27 2020-07-27 19:00:38 -07:00
Fish
7178de25ad Pin to unicorn>=1.0.2rc4. 2020-07-24 02:16:54 -07:00
Audrey Dutcher
9d72860feb More explicit error message during install 2020-07-18 17:46:38 -07:00
Kevin Phoenix
31189a693f
Pin cffi to >=1.14.0, fixes #2255 (#2256) 2020-07-13 23:10:01 -07:00
angr release bot
ef275c616f ticked version number to 8.20.7.6 2020-07-06 13:19:23 -07:00
Fish
c14bc39aac
Parse GNU C++ mangled function names and extract types. (#2215)
* Parses GNU C++ mangled function names and extract types.

* Lint the code.
2020-06-24 10:37:32 -07:00
angr release bot
18d562f215 ticked version number to 8.20.6.8 2020-06-08 15:56:42 -07:00
angr release bot
3b598e514f ticked version number to 8.20.6.1 2020-06-01 16:10:00 -07:00
Fish
686626ec58 setup.py: Unify unicorn version constraints.
We were not specifying version constraints for unicorn in
setup_requires, which makes bdist_wheel and build download the latest
stable version of unicorn (which is 1.0.1 at this moment), leading to
broken angr_native.dll being built on Windows. This fix addresses this
problem.
2020-05-30 14:07:17 -07:00
angr release bot
76aa009473 ticked version number to 8.20.5.27 2020-05-27 22:20:35 -07:00
Florian Magin
766d7d7216
Type Annotations for angr (#1752)
* Add PEP 561 py.typed file

* Various annotations, some useful, some to reduce the deluge of errors

* Type annotate various state related code and some default state_plugins

* Annotate memory, callstack, mem

* More state annotations

* more scattered annotations

* Minor annotations

* Minor annotations

* Fix lint issues in solver.py

* Fix more linting issues

* Fix import issues

* Move type aliases from pyvex to archinfo. Trigger CI again.

* Remove duplicated import.

Co-authored-by: Florian Magin <fmagin@users.noreply.github.com>
Co-authored-by: Fish <fishw@asu.edu>
2020-05-06 09:01:54 -07:00
Audrey Dutcher
edc4f56e5e Mark requirement for python 3.6 2020-04-12 23:44:49 -07:00
Fish
4c68259ade
angr database (#2034)
* A preliminary implementation of angrdb.

* Get a preliminary implementation working.

- Switch from sqlite3 to sqlalchemy.

- Implement serializers for Loader, CFG, and FunctionManager.

- Fix a few issues in parsing and serializing knowledge plugins.

* Fix CFBlanket initialization.

* Support XRefs and some fixes.

* Make sqlalchemy an optional dependency.

* Make angrdb optional.

* Add a test case for AngrDB.

* Support dumping and loading comments.

* Support dumping/loading labels.

* Add an information table. Resiliency. More test cases.

* Lint the code.
2020-04-01 12:34:39 -07:00
Audrey Dutcher
a058f4b050 Pin version of unicorn so hopefully pip install angr works on macos 2020-02-18 17:43:27 -07:00