#!/bin/bash
cd /root/recon
for ip in 67.135.162.152 69.194.131.119 69.194.131.116 64.23.150.142; do
  echo "=== $ip ==="
  curl -sk -m 10 "https://$ip/get_portal_info" | head -c 150 | tr '\n' ' '; echo
  curl -sk -m 10 -o /tmp/f4.html "https://$ip/"
  grep -aoiE '<title[^>]*>[^<]*' /tmp/f4.html | head -1
  echo -n "cert: "; echo | openssl s_client -connect $ip:443 -servername $ip 2>/dev/null | openssl x509 -noout -subject 2>/dev/null | head -1
  rm -f /tmp/f4.html
done
echo F4DONE
