Reverse Whoxy Domain Status (OSINT)

Check if websites are online in a reverse whoxy list

// ==UserScript==
// @name         Reverse Whoxy Domain Status (OSINT)
// @namespace    http://tampermonkey.net/
// @version      1.2
// @description  Check if websites are online in a reverse whoxy list
// @author       SH3LL
// @match        https://www.whoxy.com/*
// @grant        GM_xmlhttpRequest
// @connect      *
// ==/UserScript==

(async function() {
    'use strict';

    // Find the target table
    const table = document.querySelector('table.grid.first_col_center');
    if (!table) {
        console.log('No table found on the page.');
        return;
    }

    // Common keywords/phrases indicating a default hoster page
    const defaultHosterKeywords = [
        'this domain is for sale',
        'domain registered',
        'domain reserved',
        'courtesy page',
        'coming soon',
        'welcome to your new website',
        'this domain has been registered',
        'placeholder page',
        'parked domain',
        'under construction',
        'domain parking',
        'domain reserved'
    ];

    // Known hosting provider domains (for redirect detection)
    const knownProviders = [
        'godaddy.com',
        'namecheap.com',
        'bluehost.com',
        'hostgator.com',
        'dreamhost.com',
        'squarespace.com',
        'wix.com',
        'siteground.com',
        'ionos.com',
        'dynadot.com'
    ];

    // Function to check if a page is a default hoster page, empty, or redirected to a provider
    async function checkDomainStatus(url) {
        try {
            // Ensure URL starts with http:// or https://
            if (!url.startsWith('http://') && !url.startsWith('https://')) {
                url = 'http://' + url;
            }

            return new Promise((resolve) => {
                GM_xmlhttpRequest({
                    method: 'GET',
                    url: url,
                    timeout: 5000,
                    onload: function(response) {
                        if (response.status >= 200 && response.status < 300) {
                            const finalUrl = response.finalUrl || url;
                            const content = response.responseText.toLowerCase();

                            // Check for redirects to known providers
                            const isProviderRedirect = knownProviders.some(provider => finalUrl.includes(provider));
                            if (isProviderRedirect) {
                                console.log(`${url}: 🔴 Red flag - Redirected to known provider (${finalUrl})`);
                                resolve(false);
                                return;
                            }

                            // Check for empty or minimal body content
                            const parser = new DOMParser();
                            const doc = parser.parseFromString(response.responseText, 'text/html');
                            const bodyContent = doc.body ? doc.body.textContent.trim() : '';
                            const isEmptyBody = !bodyContent || bodyContent.length < 50;

                            if (isEmptyBody) {
                                console.log(`${url}: 🔴 Red flag - Empty or minimal page content`);
                                resolve(false);
                                return;
                            }

                            // Check for default hoster keywords
                            const matchingKeyword = defaultHosterKeywords.find(keyword => content.toLowerCase().includes(keyword.toLowerCase()));
                            if (matchingKeyword) {
                                console.log(`${url}: 🔴 Red flag - Contains default hoster keyword (${matchingKeyword})`);
                                resolve(false);
                                return;
                            }

                            console.log(`${url}: 🟢 Green flag - Active website with valid content`);
                            resolve(true);
                        } else {
                            console.log(`${url}: 🔴 Red flag - HTTP status ${response.status}`);
                            resolve(false);
                        }
                    },
                    onerror: function() {
                        console.log(`${url}: 🔴 Red flag - Network error`);
                        resolve(false);
                    },
                    ontimeout: function() {
                        console.log(`${url}: 🔴 Red flag - Request timed out`);
                        resolve(false);
                    }
                });
            });
        } catch (error) {
            console.log(`${url}: 🔴 Red flag - Error checking status: ${error.message}`);
            return false;
        }
    }

    // Process each row in the table
    const rows = table.querySelectorAll('tbody tr');
    for (const row of rows) {
        const domainCell = row.querySelector('td:nth-child(2) a');
        if (domainCell) {
            const domain = domainCell.textContent.trim();
            const statusLink = document.createElement('a');
            statusLink.style.marginLeft = '5px';
            statusLink.textContent = '🔄'; // Loading indicator
            statusLink.href = `http://${domain}`;
            statusLink.target = '_blank'; // Open in new tab
            domainCell.parentElement.appendChild(statusLink);

            const isActive = await checkDomainStatus(domain);
            statusLink.textContent = isActive ? '🟢' : '🔴';
        }
    }
})();