Advanced Bypass for MegaVIP and Similar Links

Bypass shortlinks on megavip.store and similar sites automatically.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         Advanced Bypass for MegaVIP and Similar Links
// @namespace    http://example.com/
// @version      1.0
// @description  Bypass shortlinks on megavip.store and similar sites automatically.
// @author       YourName
// @match        *://megavip.store/s?*
// @grant        GM_xmlhttpRequest
// @grant        GM_addStyle
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';

    // Utility function to wait for an element to appear on the page
    function waitForElement(selector, callback) {
        const observer = new MutationObserver(function(mutations, observer) {
            const element = document.querySelector(selector);
            if (element) {
                callback(element);
                observer.disconnect();
            }
        });
        observer.observe(document.body, { childList: true, subtree: true });
    }

    // Function to bypass shortlinks
    function bypassMegaVIP() {
        const currentUrl = window.location.href;

        // If we're on the shortlink page, start the bypass process
        if (currentUrl.includes('megavip.store/s?')) {

            // Attempt to detect captcha presence
            if (document.querySelector('.g-recaptcha') || document.querySelector('#captcha')) {
                alert("Captcha detected. Please solve the captcha manually.");
                return;
            }

            // Make a background request to the same URL to retrieve page content
            GM_xmlhttpRequest({
                method: "GET",
                url: currentUrl,
                onload: function(response) {
                    // Extract the final redirect URL from the page content using a regex search
                    const match = response.responseText.match(/window\.location\.href\s*=\s*"(https?:\/\/[^"]+)"/);

                    // If a valid URL is found, automatically redirect to it
                    if (match && match[1]) {
                        window.location.href = match[1]; // Redirect to the real link
                    } else {
                        // Fallback for dynamic button clicks
                        console.log("Redirect URL not found in HTML. Waiting for possible dynamic content...");

                        // Wait for any download button or link
                        waitForElement('a[href*="download"], .download-button', function(element) {
                            element.click();
                        });
                    }
                }
            });
        }
    }

    // Inject custom styles to hide any annoying ads or popups that may interfere with bypass
    GM_addStyle(`
        .ads, .popup, .ad-banner, .overlay, .captcha-popup {
            display: none !important;
        }
    `);

    // Start the bypass process after the page loads
    window.addEventListener('load', bypassMegaVIP);
})();