import asyncio
import aiohttp

HOSTS = [("216.70.69.240", "themakingsofme.com"), ("205.186.132.62", "403bwise.com"),
         ("70.32.89.52", "tinybop.com"), ("70.32.81.91", "join.tv"),
         ("216.70.114.97", "pacificcoastfloralwholesale.com"), ("70.32.85.15", "iimnagpur.ac.in"),
         ("205.186.128.85", "smileshoponline.com"), ("216.70.97.179", "abdatapartnerships.ca")]
PATHS = ["/plesk-stat/webstat/", "/plesk-stat/webstat-ssl/", "/plesk-stat/webstat/index.html", "/awstats/awstats.pl"]

async def main():
    tout = aiohttp.ClientTimeout(total=20)
    async with aiohttp.ClientSession(timeout=tout, headers={"User-Agent": "Mozilla/5.0"}) as s:
        for ip, dom in HOSTS:
            out = []
            for p in PATHS:
                try:
                    async with s.get(f"https://{ip}{p}", headers={"Host": dom}, ssl=False, allow_redirects=True) as r:
                        t = await r.content.read(6000)
                    b = t.decode("utf-8", "replace")
                    mark = "GOACCESS" if "GoAccess" in b else ""
                    out.append(f"{p.split('/')[2][:9]}={r.status}{mark}")
                except Exception as e:
                    out.append(f"{p.split('/')[2][:9]}=E:{type(e).__name__[:10]}")
            print(f"{ip:16s} {dom[:34]:34s} " + " ".join(out))

asyncio.run(main())
