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"),
         ("70.32.94.41", "healthtimes.com.au"), ("205.186.129.241", "occent.net")]
PATHS = ["/plesk-stat/webstat/", "/plesk-stat/webstat-ssl/", "/plesk-stat/webstat/index.html",
         "/awstats/awstats.pl", "/plesk-stat/", "/webstat/"]

async def main():
    tout = aiohttp.ClientTimeout(total=15)
    async with aiohttp.ClientSession(timeout=tout, headers={"User-Agent": "Mozilla/5.0"}) as s:
        for ip, dom in HOSTS:
            row = []
            for p in PATHS:
                try:
                    async with s.get(f"http://{ip}{p}", headers={"Host": dom}, ssl=False, allow_redirects=False) as r:
                        t = await r.content.read(2000)
                    body = t.decode("utf-8", "replace")
                    mark = "G" if "GoAccess" in body else ""
                    row.append(f"{p.split('/')[2][:8]}={r.status}{mark}")
                except Exception as e:
                    row.append(f"{p.split('/')[2][:8]}=E")
            print(f"{ip:16s} {dom[:32]:32s} " + " ".join(row))

asyncio.run(main())
