#!/bin/bash
for ip in 104.75.4.33 104.99.183.33 104.70.181.33 104.71.128.33 104.77.206.33 104.70.179.33 104.59.61.194 100.8.86.122; do
  echo "=== $ip ==="
  # portal_info often reveals X-Ns-Company / site names
  curl -sk -m 10 "https://$ip/get_portal_info" | head -c 500 | tr '\n' ' '; echo
  # login page title full (no truncation) + any company hints
  curl -sk -m 10 -o /tmp/btl_$ip.txt "https://$ip/"
  grep -aoiE '<title>[^<]*' /tmp/btl_$ip.txt | head -1
  grep -aoiE 'company[^"<]{0,50}|X-Ns-Company[^"<]{0,40}' /tmp/btl_$ip.txt | head -2
  rm -f /tmp/btl_$ip.txt
done