mirror of
https://github.com/ysoftdevs/wapifuzz.git
synced 2026-03-20 00:24:06 +01:00
Init WFuzz state
This commit is contained in:
35
tests/sql_blind_injection/test.sh
Normal file
35
tests/sql_blind_injection/test.sh
Normal file
@@ -0,0 +1,35 @@
|
||||
# Start server which does not send any response
|
||||
python3 "$(dirname "${BASH_SOURCE[0]}")/web_and_sql_server.py" &
|
||||
SERVER_PID=`echo $!`
|
||||
|
||||
function trap_sigint()
|
||||
{
|
||||
kill -9 $SERVER_PID
|
||||
exit 2
|
||||
}
|
||||
|
||||
trap "trap_sigint" 2
|
||||
|
||||
cd ../
|
||||
|
||||
# Run fuzzer
|
||||
./run.sh ./tests/localhost_config.json ./tests/documentation.yaml
|
||||
|
||||
# Check logs, if there are tests with failure
|
||||
cat fuzzing.log | grep "Timeout or closed connection"
|
||||
IS_MATCH1=`echo $?`
|
||||
|
||||
cat ./reporter/reports.junit.xml | grep "Timeout or closed connection"
|
||||
IS_MATCH2=`echo $?`
|
||||
|
||||
cat ./reporter/reports.html | grep "Timeout or closed connection"
|
||||
IS_MATCH3=`echo $?`
|
||||
|
||||
# Kill server
|
||||
kill -9 $SERVER_PID
|
||||
|
||||
if [ $IS_MATCH1 -eq 0 -a $IS_MATCH2 -eq 0 -a $IS_MATCH3 -eq 0 ] ; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
exit 1
|
||||
Reference in New Issue
Block a user