1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/dist/tools/fuzzing/afl.sh
Sören Tempel 24468bead6 fuzzing: Initialize
This adds a new subdirectory called `fuzzing/` which will contain
applications for fuzzing various RIOT network modules in the future.
This subdirectory is heavily inspired by the `examples/` subdirectory.

The fuzzing applications use AFL as a fuzzer. Each application contains
Makefiles, source code, and an input corpus used by AFL to generate
input for fuzzing.
2020-04-17 17:11:15 +02:00

11 lines
258 B
Bash
Executable File

#!/bin/sh
if [ ! -d "${APPDIR}/input" ]; then
echo "${APPDIR}: Doesn't provide a test corpus" 1>&2
exit 1
fi
mkdir -p "${APPDIR}/findings"
exec afl-fuzz -m 800 -i "${APPDIR}/input" -o "${APPDIR}/findings" "$@" -- \
"${FLASHFILE}" "${PORT}" ${TERMFLAGS}