Skip to content

Commit

Permalink
Integrate the fuzzing deps into poetry
Browse files Browse the repository at this point in the history
as an extra, since there are no dev extras in poetry
  • Loading branch information
lazka committed Mar 14, 2021
1 parent 1315c1c commit 30f373f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 79 deletions.
4 changes: 1 addition & 3 deletions fuzzing/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ Uses `python-afl <https://github.com/jwilk/python-afl>`__ and `afl
<https://lcamtuf.coredump.cx/afl/>`__

* Install afl, for example ``sudo apt install afl++`` on Debian/Ubuntu
* ``poetry install``
* ``poetry install -E fuzzing-dev``
* ``poetry shell``
* Add some example files into ``_examples``
* ``./run.sh`` will start multiple afl-fuzz instances
* Run ``watch -n 1 -c afl-whatsup -s _results`` to see a summary
of all active runners
* CTRL+C to stop
* Run ``./check_crashes.sh`` to get a summary of the errors found
58 changes: 0 additions & 58 deletions fuzzing/poetry.lock

This file was deleted.

16 changes: 0 additions & 16 deletions fuzzing/pyproject.toml

This file was deleted.

4 changes: 2 additions & 2 deletions fuzzing/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ for i in `seq 2 $(nproc)`; do
py-afl-fuzz -i "$EXAMPLES" -o "$RESULTS" -S "worker-$i" -- $(which python) sut.py > /dev/null 2>&1 &
done

py-afl-fuzz -i "$EXAMPLES" -o "$RESULTS" -M "main" -- $(which python) sut.py # > /dev/null 2>&1 &
#watch -n 1 -c afl-whatsup -s "$RESULTS"
py-afl-fuzz -i "$EXAMPLES" -o "$RESULTS" -M "main" -- $(which python) sut.py > /dev/null 2>&1 &
watch -n 1 -c afl-whatsup -s "$RESULTS"
pkill afl-fuzz
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ authors = []

[tool.poetry.dependencies]
python = "^3.6"
python-afl = {version = "^0.7.3", optional = true}

[tool.poetry.extras]
fuzzing-dev = ["python-afl"]

[tool.poetry.dev-dependencies]
pytest = "^6.2.2"
Expand Down

0 comments on commit 30f373f

Please sign in to comment.