Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions fuzzer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# how to fuzz nostrdb with afl++

1. Install Clang 14+
2. Install LLVM 14+
3. Install AFL++
4. Then...
AFL_USE_ASAN=1 afl-clang-lto -flto=full -fsanitize=address -Wall -Wno-unused-function -Werror -O2 -g -Ideps/secp256k1/include -Ideps/lmdb -Ideps/flatcc/include fuzzer.c nostrdb.c sha256.c deps/flatcc/src/runtime/json_parser.c deps/flatcc/src/runtime/builder.c deps/flatcc/src/runtime/emitter.c deps/flatcc/src/runtime/refmap.c deps/lmdb/liblmdb.a deps/secp256k1/.libs/libsecp256k1.a -o fuzzer
create an input directory drop some sort of starting corpus. i chose blns.txt because it rocks.
5. create an input directory for your starting corpus. i chose blns.txt because it's awesome.
6. afl-fuzz -i $input -o $output -- ./fuzzer