diff options
| author | Louis Burda <quent.burda@gmail.com> | 2021-05-27 21:58:17 +0200 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2021-05-27 21:58:17 +0200 |
| commit | 8057ab1167b3c0c19f8212c86c7a849ca3997d47 (patch) | |
| tree | ff772afba37149dbfd2cab0e28b39fe2e81c61fa /checker/test.sh | |
| parent | 002a422e321971d2c6d4c54ffe40288252299cf8 (diff) | |
| download | enowars5-service-stldoctor-8057ab1167b3c0c19f8212c86c7a849ca3997d47.tar.gz enowars5-service-stldoctor-8057ab1167b3c0c19f8212c86c7a849ca3997d47.zip | |
bumped enochecker and implemented exploits with minor tweaks to source
Diffstat (limited to 'checker/test.sh')
| -rw-r--r-- | checker/test.sh | 23 |
1 files changed, 14 insertions, 9 deletions
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 <IP>" -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 |
