#!/bin/bash
UA='Mozilla/5.0'
for u in 'https://console.ocm.utah.edu/AirWatch/default.aspx' 'https://awac.jjtaylor.org/AirWatch/default.aspx' 'https://airwatch.dsa.dhs/AirWatch/default.aspx' 'https://mdm-console.mdr.mdscc.nasa.gov/AirWatch/default.aspx'; do
  echo "== $u"
  curl -gsk -m 15 -A "$UA" -o /tmp/w1.html "$u" -w 'rc:%{http_code}\n'
  grep -aoiE '<title[^>]*>[^<]*|version[^"<]{0,25}|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' /tmp/w1.html | grep -vE '^\s*$' | head -3
  rm -f /tmp/w1.html
done
getent hosts airwatch.dsa.dhs console.ocm.utah.edu mdm-console.mdr.mdscc.nasa.gov
echo W1DONE
