R3AP Executor

JS Executor interface with galaxy background, security detection, and draggable UI.

Na nainštalovanie skriptu si budete musieť nainštalovať rozšírenie, ako napríklad Tampermonkey, Greasemonkey alebo Violentmonkey.

Na inštaláciu tohto skriptu je potrebné nainštalovať rozšírenie, ako napríklad Tampermonkey.

Na nainštalovanie skriptu si budete musieť nainštalovať rozšírenie, ako napríklad Tampermonkey, % alebo Violentmonkey.

Na nainštalovanie skriptu si budete musieť nainštalovať rozšírenie, ako napríklad Tampermonkey alebo Userscripts.

Na inštaláciu tohto skriptu je potrebné nainštalovať rozšírenie, ako napríklad Tampermonkey.

Na inštaláciu tohto skriptu je potrebné nainštalovať rozšírenie správcu používateľských skriptov.

(Už mám správcu používateľských skriptov, nechajte ma ho nainštalovať!)

Advertisement:

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie, ako napríklad Stylus.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie, ako napríklad Stylus.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie, ako napríklad Stylus.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie správcu používateľských štýlov.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie správcu používateľských štýlov.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie správcu používateľských štýlov.

(Už mám správcu používateľských štýlov, nechajte ma ho nainštalovať!)

Advertisement:

// ==UserScript==
// @name         R3AP Executor
// @namespace    http://tampermonkey.net/
// @version      1.2
// @description  JS Executor interface with galaxy background, security detection, and draggable UI.
// @author       xxhjxx
// @match        *://*/*
// @grant        GM_xmlhttpRequest
// @connect      deobfuscate.io
// @connect      obf-io.deobfuscate.io
// ==/UserScript==

(function() {
    'use strict';

    if (window.top !== window.self) return;

    // Create Main Container
    const container = document.createElement('div');
    container.id = 'r3ap-executor-root';
    container.style = `
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 420px;
        height: 520px;
        background: #0b0b16;
        border: 2px solid #3a0ca3;
        border-radius: 12px;
        z-index: 999999;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        box-shadow: 0 0 20px rgba(114, 9, 183, 0.5);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        color: #fff;
        user-select: none;
    `;

    // Create Canvas for Moving Galaxy Background
    const canvas = document.createElement('canvas');
    canvas.style = `
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: -1;
        pointer-events: none;
    `;
    container.appendChild(canvas);

    // GUI Layout with Author Tag
    container.innerHTML += `
        <div id="r3ap-header" style="padding: 15px; background: rgba(15, 15, 35, 0.7); border-bottom: 1px solid #3a0ca3; display: flex; justify-content: space-between; align-items: center; cursor: move;">
            <div style="display: flex; flex-direction: column;">
                <span style="font-weight: bold; font-size: 18px; letter-spacing: 2px; color: #f72585; text-shadow: 0 0 8px #f72585; pointer-events: none;">R3AP EXECUTOR</span>
                <span style="font-size: 10px; color: #7209b7; letter-spacing: 1px; margin-top: 2px; font-weight: bold;">BY: xxhjxx</span>
            </div>
            <button id="r3ap-close" style="background: none; border: none; color: #999; cursor: pointer; font-size: 16px; pointer-events: auto;">✕</button>
        </div>
        <div style="flex: 1; padding: 15px; display: flex; flex-direction: column; gap: 12px; background: rgba(0,0,0,0.2); user-select: text;">
            <textarea id="r3ap-code-input" placeholder="Paste your JavaScript or obfuscated code here..." style="flex: 1; background: rgba(10, 10, 25, 0.8); border: 1px solid #7209b7; border-radius: 6px; color: #00f5d4; font-family: monospace; padding: 10px; resize: none; outline: none; font-size: 13px; box-shadow: inset 0 0 5px rgba(0,0,0,0.5);"></textarea>
            <div id="r3ap-status" style="font-size: 12px; min-height: 18px; color: #4cc9f0; font-weight: 500;">Status: Ready</div>
            <div style="display: flex; gap: 10px;">
                <button id="r3ap-btn-execute" style="flex: 1; padding: 12px; background: #7209b7; border: none; border-radius: 6px; color: white; font-weight: bold; cursor: pointer; transition: 0.2s; box-shadow: 0 4px 6px rgba(0,0,0,0.3);">EXECUTE</button>
                <button id="r3ap-btn-decrypt" style="flex: 1; padding: 12px; background: #3f37c9; border: none; border-radius: 6px; color: white; font-weight: bold; cursor: pointer; transition: 0.2s; box-shadow: 0 4px 6px rgba(0,0,0,0.3);">DECRYPT</button>
            </div>
        </div>
    `;

    document.body.appendChild(container);

    // --- 1. Draggable Interface Logic ---
    const header = document.getElementById('r3ap-header');
    let isDragging = false;
    let offsetX = 0;
    let offsetY = 0;

    header.addEventListener('mousedown', (e) => {
        if (e.target.id === 'r3ap-close') return;
        isDragging = true;

        offsetX = e.clientX - container.getBoundingClientRect().left;
        offsetY = e.clientY - container.getBoundingClientRect().top;

        container.style.top = `${container.getBoundingClientRect().top}px`;
        container.style.left = `${container.getBoundingClientRect().left}px`;
        container.style.bottom = 'auto';
        container.style.right = 'auto';
    });

    document.addEventListener('mousemove', (e) => {
        if (!isDragging) return;

        let newX = e.clientX - offsetX;
        let newY = e.clientY - offsetY;

        // Keep panel inside the accessible browser frame
        newX = Math.max(0, Math.min(newX, window.innerWidth - container.offsetWidth));
        newY = Math.max(0, Math.min(newY, window.innerHeight - container.offsetHeight));

        container.style.left = `${newX}px`;
        container.style.top = `${newY}px`;
    });

    document.addEventListener('mouseup', () => {
        isDragging = false;
    });


    // --- 2. Moving Galaxy Background Animation ---
    const ctx = canvas.getContext('2d');
    let stars = [];
    const numStars = 60;

    function resizeCanvas() {
        canvas.width = container.clientWidth;
        canvas.height = container.clientHeight;
    }
    resizeCanvas();

    class Star {
        constructor() {
            this.x = Math.random() * canvas.width;
            this.y = Math.random() * canvas.height;
            this.radius = Math.random() * 1.5;
            this.speed = Math.random() * 0.4 + 0.1;
            this.alpha = Math.random();
            this.fade = Math.random() * 0.02 * (Math.random() > 0.5 ? 1 : -1);
        }
        update() {
            this.x -= this.speed;
            if (this.x < 0) {
                this.x = canvas.width;
                this.y = Math.random() * canvas.height;
            }
            this.alpha += this.fade;
            if (this.alpha > 1 || this.alpha < 0) {
                this.fade = -this.fade;
            }
        }
        draw() {
            ctx.beginPath();
            ctx.arc(this.x, this.y, this.radius, 0, Math.PI * 2);
            ctx.fillStyle = `rgba(255, 255, 255, ${Math.max(0.1, Math.min(this.alpha, 1))})`;
            ctx.fill();
        }
    }

    for (let i = 0; i < numStars; i++) {
        stars.push(new Star());
    }

    function animateGalaxy() {
        ctx.fillStyle = 'rgba(11, 11, 22, 0.2)';
        ctx.fillRect(0, 0, canvas.width, canvas.height);

        stars.forEach(star => {
            star.update();
            star.draw();
        });
        requestAnimationFrame(animateGalaxy);
    }
    animateGalaxy();


    // --- 3. Safety Verification & Execution Controls ---
    const codeInput = document.getElementById('r3ap-code-input');
    const statusDiv = document.getElementById('r3ap-status');
    const executeBtn = document.getElementById('r3ap-btn-execute');
    const decryptBtn = document.getElementById('r3ap-btn-decrypt');
    const closeBtn = document.getElementById('r3ap-close');

    function scanForObfuscation(code) {
        // Detect JSFuck signatures (uses only [, ], (, ), !, +)
        const jsfuckPattern = /^[\[\]\(\)\!\+ \n\r\t]+$/;

        // Detect intense obfuscation signatures (heavy density of hex values or arrays matching obfuscator.io outputs)
        const hexArrayPattern = /_0x[a-f0-9]{4,}\s*=\s*\[\s*['"]/i;
        const heavyHexDensity = (code.match(/0x[a-f0-9]+/gi) || []).length > 35;
        const globalDeobfuscatorPattern = /eval\s*\(\s*function\s*\(\s*p\s*,\s*a\s*,\s*c\s*,\s*k/i;

        if (jsfuckPattern.test(code.replace(/\s/g, "")) || hexArrayPattern.test(code) || heavyHexDensity || globalDeobfuscatorPattern.test(code)) {
            return true;
        }
        return false;
    }

    // Execute Handler
    executeBtn.addEventListener('click', () => {
        const code = codeInput.value.trim();

        // Requirement: "if there is no code in text holder after clicking execute display message no code found"
        if (!code) {
            statusDiv.style.color = '#ff4d4d';
            statusDiv.innerText = 'Status: no code found';
            return;
        }

        // Requirement: "if jsfuck and heavily obfuscated code detetcted display code is not safe to execute"
        if (scanForObfuscation(code)) {
            statusDiv.style.color = '#ff4d4d';
            statusDiv.innerText = 'Status: code is not safe to execute';
            return;
        }

        try {
            statusDiv.style.color = '#00f5d4';
            statusDiv.innerText = 'Status: Executing clean script...';
            const runCode = new Function(code);
            runCode();
            statusDiv.innerText = 'Status: Executed successfully';
        } catch (err) {
            statusDiv.style.color = '#ff4d4d';
            statusDiv.innerText = `Status: Execution Error - ${err.message}`;
        }
    });

    // Decrypt Handler
    decryptBtn.addEventListener('click', () => {
        const code = codeInput.value.trim();
        if (!code) {
            statusDiv.style.color = '#ff4d4d';
            statusDiv.innerText = 'Status: No input text to decrypt';
            return;
        }

        statusDiv.style.color = '#4cc9f0';
        statusDiv.innerText = 'Status: Transmitting code payload to deobfuscate.io...';

        // Connect request framework targeting deobfuscate.io's engine space
        GM_xmlhttpRequest({
            method: "POST",
            url: "https://obf-io.deobfuscate.io/deobfuscate",
            headers: {
                "Content-Type": "application/json",
                "Origin": "https://deobfuscate.io",
                "Referer": "https://deobfuscate.io/"
            },
            data: JSON.stringify({ source: code, options: { removeProxyFunctions: true, simplifyExpressions: true } }),
            onload: function(response) {
                if (response.status === 200) {
                    try {
                        const resData = JSON.parse(response.responseText);
                        codeInput.value = resData.code || response.responseText;
                        statusDiv.style.color = '#00f5d4';
                        statusDiv.innerText = 'Status: Decryption successful';
                    } catch(e) {
                        codeInput.value = response.responseText;
                        statusDiv.style.color = '#00f5d4';
                        statusDiv.innerText = 'Status: Parsed plain response';
                    }
                } else {
                    statusDiv.style.color = '#ff4d4d';
                    statusDiv.innerText = `Status: deobfuscate.io returned code ${response.status}`;
                }
            },
            onerror: function() {
                statusDiv.style.color = '#ff4d4d';
                statusDiv.innerText = 'Status: Connection blocked or service offline';
            }
        });
    });

    closeBtn.addEventListener('click', () => {
        container.remove();
    });

})();