From 8057ab1167b3c0c19f8212c86c7a849ca3997d47 Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Thu, 27 May 2021 21:58:17 +0200 Subject: bumped enochecker and implemented exploits with minor tweaks to source --- checker/test.sh | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'checker/test.sh') diff --git a/checker/test.sh b/checker/test.sh index f0b6159..f6326d6 100644 --- a/checker/test.sh +++ b/checker/test.sh @@ -2,6 +2,9 @@ ipstr="$1" +SCRIPTPATH="$(dirname $(readlink -f "$0"))" +export REVHASH_PATH="$SCRIPTPATH/src/revhash/revhash" + try() { cmd="$1" if [ $# -lt 2 ]; then @@ -10,16 +13,18 @@ try() { variant=$2 fi echo "Executing $cmd with variant $variant.." - output=$(enochecker_cli -A "http://localhost:8000/" -a "$ipstr" -v "$variant" -x 4000 "$cmd") - echo $output - [ -z "$(echo $output | grep OK)" ] && exit 1 + python3 src/checker.py -j run -v "$variant" -x 4000 \ + --flag ENOTESTFLAG123= --flag_regex 'ENO.*=' \ + ${@:3} "$cmd" | tee /tmp/checker-log + [ -z "$(cat /tmp/checker-log | grep OK)" ] && exit 1 } -if [ $# -lt 1 ]; then - echo "USAGE: test.sh " -elif [ $# -eq 3 ]; then - try "$2" "$3" +if [ $# -eq 2 ]; then + try $@ +elif [ "$1" == "test-exploits" ]; then + try exploit 0 + try exploit 1 else try putflag 0 try getflag 0 @@ -38,8 +43,8 @@ else try havoc 2 try havoc 3 -# try exploit 0 -# try exploit 1 + try exploit 0 + try exploit 1 fi exit 0 -- cgit v1.2.3-71-gd317