#!/bin/bash
for ip in 3.9.109.248 45.77.45.153; do
  echo "=== $ip ==="
  curl -sk -m 10 -o /tmp/f3.html "https://$ip/global-protect/login.esp" -w 'gp:%{http_code}\n'
  grep -aoiE '<title[^>]*>[^<]*' /tmp/f3.html | head -1
  curl -sk -m 10 -o /tmp/f3b.html "https://$ip/" -w 'root:%{http_code}\n'
  grep -aoiE '<title[^>]*>[^<]*' /tmp/f3b.html | head -1
  rm -f /tmp/f3.html /tmp/f3b.html
done
echo F3DONE
