-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tools, fuzzing): better fuzzing tooling to start the docker imag…
…e immediately, build arkscript and launch multiple fuzzers
- Loading branch information
Showing
5 changed files
with
60 additions
and
4 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
if ! [ -f /.dockerenv ]; then | ||
echo "This script needs to run inside the aflplusplus docker container" | ||
exit 1 | ||
fi | ||
if [[ $(ls -l | grep tests) == "" ]]; then | ||
echo "This script needs to run at the root of ArkScript-lang/Ark" | ||
exit 1 | ||
fi | ||
|
||
cd /src || exit 1 | ||
|
||
cmake -Bbuild \ | ||
-DCMAKE_C_COMPILER=/AFLplusplus/afl-cc \ | ||
-DCMAKE_CXX_COMPILER=/AFLplusplus/afl-c++ \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DARK_BUILD_EXE=On \ | ||
-DARK_SANITIZERS=On | ||
cmake --build build --config Release -j $(nproc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
if ! [ -f /.dockerenv ]; then | ||
echo "This script needs to run inside the aflplusplus docker container" | ||
exit 1 | ||
fi | ||
|
||
cd /src || exit 1 | ||
|
||
################################################### | ||
# Install utilities | ||
################################################### | ||
|
||
apt update -yq | ||
apt install -yq tmux | ||
|
||
################################################### | ||
# Build ArkScript | ||
################################################### | ||
source ./tests/fuzzing/docker/1-build-with-afl.sh | ||
|
||
################################################### | ||
# Launch the fuzzers | ||
################################################### | ||
echo "Starting main fuzzer" && tmux new-session -d './tests/fuzzing/docker/2-fuzz.sh 0' | ||
sleep 20 # wait for the main fuzzer to be up and ready | ||
|
||
echo "Starting sub-fuzzer" && tmux new-session -d './tests/fuzzing/docker/2-fuzz.sh 1' | ||
echo "Starting sub-fuzzer" && tmux new-session -d './tests/fuzzing/docker/2-fuzz.sh 2' | ||
echo "Starting sub-fuzzer" && tmux new-session -d './tests/fuzzing/docker/2-fuzz.sh 3' | ||
echo "Starting sub-fuzzer" && tmux new-session -d './tests/fuzzing/docker/2-fuzz.sh 4' | ||
|
||
tmux attach 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters