ICT Code Hub - Cheat V1

Bypass total ICT Code Hub: Anti-ESC/F11, Anti-Tab Switch, Copy-Paste Unlock, & Panic Mode (Alt+M).

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

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

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

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

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

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

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

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

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

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

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

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

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

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

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         ICT Code Hub - Cheat V1
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Bypass total ICT Code Hub: Anti-ESC/F11, Anti-Tab Switch, Copy-Paste Unlock, & Panic Mode (Alt+M).
// @author       Richie
// @match        *://ictcodehub.web.id/*
// @grant        none
// @run-at       document-start
// @license MIT
// ==/UserScript==

//Important note : Saat ini anti-cheat terlalu ketat bahkan sekedar esc sudah cukup untuk auto submit

(function() {
    'use strict';

    let isGhostActive = true;
    const screenW = window.screen.width;
    const screenH = window.screen.height;

    // 1. NATIVE CODE SPOOFER (Standard Shield)
    const spoofNative = (fn, name) => {
        return new Proxy(fn, {
            get: (t, prop) => {
                if (prop === 'toString') return () => `function ${name}() { [native code] }`;
                return Reflect.get(t, prop);
            }
        });
    };

    const lock = (obj, prop, value) => {
        Object.defineProperty(obj, prop, {
            get: spoofNative(() => value, prop),
            set: () => {},
            configurable: false
        });
    };

    lock(Document.prototype, 'visibilityState', 'visible');
    lock(Document.prototype, 'hidden', false);
    window.hasFocus = document.hasFocus = spoofNative(() => true, 'hasFocus');
    lock(window, 'innerWidth', screenW);
    lock(window, 'innerHeight', screenH);

    // 2. THE KEYBOARD SILENCER (Inti Perbaikan)
    // Mencegat semua event keyboard sebelum Exam.js sempat melihatnya
    const keyInterceptor = (e) => {
        if (!isGhostActive) return;

        const key = e.key;
        const code = e.code;
        const keyCode = e.keyCode;

        // Daftar tombol haram yang dipantau oleh proctoring
        const forbiddenKeys = [
            'F11', 'Escape', 'Esc',
            'Tab', 'Alt', 'Meta', 'OS', 'Windows'
        ];

        // Deteksi Ctrl+C / Ctrl+V
        const isCopyPaste = (e.ctrlKey || e.metaKey) && (key === 'c' || key === 'v' || key === 'C' || key === 'V');

        if (forbiddenKeys.includes(key) || forbiddenKeys.includes(code) || isCopyPaste) {
            // Hentikan penjalaran event ini ke listener lain (yaitu listener dari Exam.js)
            e.stopImmediatePropagation();
            // e.preventDefault(); // Jangan di-uncomment jika kamu ingin fungsi F11/ESC browser tetap jalan secara fisik

            // Console log ini opsional, bisa dihapus agar rapi
            // console.log(`[Ghost] Membungkam tombol: ${key}`);
        }
    };

    // Pasang listener di fase CAPTURE (true) agar kita menangkapnya paling pertama
    window.addEventListener('keydown', keyInterceptor, true);
    window.addEventListener('keyup', keyInterceptor, true);
    document.addEventListener('keydown', keyInterceptor, true);
    document.addEventListener('keyup', keyInterceptor, true);

    // 3. EVENT ADDEVENTLISTENER HIJACK (Double Protection)
    const originalAddEventListener = EventTarget.prototype.addEventListener;
    EventTarget.prototype.addEventListener = spoofNative(function(type, listener, options) {
        const traps = ['blur', 'visibilitychange', 'resize', 'focusout', 'mouseleave', 'fullscreenchange'];

        // Jika Exam.js mencoba mendaftarkan keydown, kita bungkus fungsi mereka
        if (type === 'keydown' || type === 'keyup') {
            return originalAddEventListener.call(this, type, (e) => {
                if (isGhostActive && (e.key === 'F11' || e.key === 'Escape')) {
                    // Jangan panggil listener asli jika ini tombol terlarang
                    return;
                }
                // Jika bukan tombol terlarang, biarkan listener asli (misal untuk mengetik kode) berjalan
                return listener.call(this, e);
            }, options);
        }

        if (traps.includes(type)) {
            return originalAddEventListener.call(this, type, (e) => {
                e.stopImmediatePropagation();
            }, options);
        }
        return originalAddEventListener.call(this, type, listener, options);
    }, 'addEventListener');

    // 4. PANIC MODE
    window.addEventListener('keydown', (e) => {
        if (e.altKey && e.code === 'KeyM') {
            isGhostActive = !isGhostActive;
            e.stopImmediatePropagation(); // Jangan sampai Alt+M tertangkap
            console.log(isGhostActive ? "GHOST: ON" : "GHOST: OFF");
        }
    }, true);

    // 5. COPY PASTE BYPASS
    ['copy', 'paste', 'cut', 'contextmenu'].forEach(evt => {
        window.addEventListener(evt, e => {
            if (isGhostActive) e.stopPropagation();
        }, true);
    });

    // 6. UI KILLER
    const style = document.createElement('style');
    style.innerHTML = `
        div.fixed.inset-0.z-\\[100000\\] { display: none !important; opacity: 0 !important; pointer-events: none !important; }
        body { overflow: auto !important; }
    `;
    document.documentElement.appendChild(style);

})();