File size: 3,708 Bytes
41613f6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/usr/bin/env python3
import re
import requests
import argparse
import json

def sys_url(url):
    if not re.match(r'^https?://', url):
        url = 'https://' + url
    return url

def exturlz(text):
    urls = re.findall(r'https?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', text)
    if not urls:
        urls = re.findall(r'www\.(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', text)
        urls = [sys_url(url) for url in urls]
    return urls

def check_website(url):
    try:
        response = requests.get(url, timeout=10)
        html_content = response.text.lower()
        httpstat = response.status_code

        cloudflare = 'server' in response.headers and 'cloudflare' in response.headers['server'].lower()
        captcha = 'recaptcha' in html_content or 'captcha' in html_content

        pymnt_gwayz = {
            'Stripe': ['stripe'],
            'PayPal': ['paypal'],
            'Shopify Payments': ['shopify'],
            'Braintree': ['braintree'],
            'Authorize.Net': ['authorize.net'],
            'Afterpay': ['afterpay'],
            'Worldpay': ['worldpay'],
            'Square': ['squareup', 'square.com'],
            'Adyen': ['adyen'],
            'ProcessOut': ['processout'],
            'Recurly': ['recurly'],
            'Airwallex': ['airwallex'],
            'Xendit': ['xendit']
        }

        gateways = []
        for gateway, keywords in pymnt_gwayz.items():
            if any(keyword in html_content for keyword in keywords):
                gateways.append(gateway)

        platform = 'WooCommerce' if 'woocommerce' in html_content else 'Unknown'

        # Get IP info from check-host.cc API
        api_url = 'https://check-host.cc/rest/V2/info'
        headers = {'accept': 'application/json', 'Content-Type': 'application/json'}
        data = {'target': url, 'apikey': 'NOKEY', 'ClientIP': None} 
        # Replace 'NOKEY' with your actual check-host.cc API key
        
        response_ip = requests.post(api_url, headers=headers, data=json.dumps(data))
        ip_info = response_ip.json()

        # Extract relevant information from IP info
        ip_details = f"""IP:        {ip_info.get('ip', 'N/A')}
Hostname:  {ip_info.get('hostname', 'N/A')}
ISP:       {ip_info.get('isp', 'N/A')}
ASN:       {ip_info.get('asn', 'N/A')}
ORG:       {ip_info.get('org', 'N/A')}
Country:   {ip_info.get('country', 'N/A')}
Region:    {ip_info.get('region', 'N/A')}
City:      {ip_info.get('city', 'N/A')}
Timezone:  {ip_info.get('timezone', 'N/A')}
"""

        chk_msg = f"""```TELEGRAM @VANO_GANZZZ
🌐 Site Check Report 🌐        
‒━‒‒━‒‒━‒‒━‒‒━‒‒━‒‒━‒‒━‒‒━‒‒━‒‒━‒‒━‒
{ip_details}
Site : {url}
Gateways : {', '.join(gateways) if gateways else 'Unknown'}
Cloudflare : {'βœ…' if cloudflare else '❌'}
Captcha : {'βœ…' if captcha else '❌'}
Platform : {platform}
HTTPS Status : {httpstat}```
Check-Host: https://check-host.cc/?m=INFO&target={url}"""
        return chk_msg
    except Exception as e:
        error_msg = f"""
🌐 **Site Check Report** 🌐        
‒━‒‒━‒‒━‒‒━‒‒━‒‒━‒‒━‒‒━‒‒━‒‒━‒‒━‒‒━‒
κ‘­ **Site** : {url}
κ‘­ **Error** :  {str(e)}
‒━‒‒━‒‒━‒‒━‒‒━‒‒━‒‒━‒‒━‒‒━‒‒━‒‒━‒‒━‒"""
        return error_msg

if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="Website checker script")
    parser.add_argument("url", help="The URL of the website to check")
    args = parser.parse_args()

    result = check_website(args.url)
    print(result)