This commit is contained in:
vovuas2003 2026-05-06 14:33:27 +03:00
parent 743263dc43
commit 6df0c32f25
4 changed files with 46 additions and 1 deletions

19
aflfuzz/build_for_afl.sh Executable file
View file

@ -0,0 +1,19 @@
#!/bin/bash
export AFL_CC=gccgo
export GCCGO=afl-gcc-fast
#unset GOROOT
go build -v -x -compiler=gccgo -o authapp_for_afl ../cmd/authapp/main.go
exit 0
go build -a -toolexec="afl-gcc-fast" -o authapp_for_afl ../cmd/authapp/main.go
exit 0
export AFL_CC=gccgo
afl-gcc-fast -o authapp_for_afl ../cmd/authapp/main.go
exit 0

View file

@ -0,0 +1,4 @@
#!/bin/bash
sudo apt-get update
sudo apt-get install -y gccgo

10
aflfuzz/run_afl.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash
mkdir -p data
cp ../data/users.db ./data/users.db
mkdir -p configs
cp ../configs/config.toml ./configs/config.toml
mkdir -p fuzz_out
afl-fuzz -V $(( 60 * 5 )) -i fuzz_in -o fuzz_out -- ./authapp_for_afl