summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2023-12-27 17:32:06 +0200
committerLars Wirzenius <liw@liw.fi>2023-12-27 17:32:06 +0200
commit170ca28db2239c4301a2ed1998c9cd218e401c78 (patch)
tree499a94c6adffffb19c4b3f3ab206c14168db12c2
parent2694053a82c059bf0baa68fceec9ffbca315f88b (diff)
downloadwumpus-hunter-170ca28db2239c4301a2ed1998c9cd218e401c78.tar.gz
feat: add script to run wumpus hunter in a loop
Signed-off-by: Lars Wirzenius <liw@liw.fi>
-rwxr-xr-xhunt.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/hunt.sh b/hunt.sh
new file mode 100755
index 0000000..2b07546
--- /dev/null
+++ b/hunt.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+set -euo pipefail
+
+WEBROOT=/srv/http/wumpus.liw.fi
+
+while true; do
+ echo "$(date "+%Y-%m-%s %H:%M:%S") Starting new test run"
+ started="$(date +%s)"
+ ./wumpus-hunter \
+ --dir ~/heartwood \
+ --log "$WEBROOT/log.txt" \
+ --run-log "$WEBROOT" \
+ --stats "$WEBROOT/stats.txt" \
+ --counts "$WEBROOT/counts.html"
+ ended="$(date +%s)"
+ duration="$(expr "$ended" - "$started")"
+ echo " $duration s"
+done