#!/bin/sh

set -e

echo "[*] Starting local web server"
python3 -m http.server 8080 &
server_pid=$!
echo "[*] Running xsstrike"
xsstrike -u 'http://localhost:8080/' --crawl \
| tee /dev/stderr \
| grep test.html

exit_code=$?

jobs

kill $server_pid
wait

exit $exit_code
