ICT Code Hub - Cheat V3

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

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         ICT Code Hub - Cheat V3
// @namespace    http://tampermonkey.net/
// @version      3.0
// @description  Bypass total ICT Code Hub: Anti-ESC/F11, Anti-Tab Switch, Copy-Paste Unlock, & Panic Mode (Alt+M).
// @author       Richie & Gemini
// @match        *://ictcodehub.web.id/*
// @grant        none
// @run-at       document-start
// @license      mit
// ==/UserScript==

(function() {
    'use strict';

    const rawToString = Function.prototype.toString;
    const originalGetDescriptor = Object.getOwnPropertyDescriptor;

    // 1. CLOAKING DEVICE: Menyamarkan semua fungsi bajakan agar terlihat "Native"
    // Ini membungkam cek .toString().includes("[native code]")
    Function.prototype.toString = function() {
        if (this === Function.prototype.toString) return rawToString.call(rawToString);
        if (this.__isProxy) return `function ${this.__name}() { [native code] }`;
        return rawToString.call(this);
    };

    const makeStealth = (fn, name) => {
        const proxy = new Proxy(fn, {
            get: (target, prop) => {
                if (prop === '__isProxy') return true;
                if (prop === '__name') return name;
                return Reflect.get(target, prop);
            }
        });
        return proxy;
    };

    // 2. DESCRIPTOR SHIELD: Membohongi pengecekan Object.getOwnPropertyDescriptor
    // Ini krusial agar pengecekan visibilityState di ExamTaker menghasilkan 'undefined' (seperti aslinya)
    Object.getOwnPropertyDescriptor = makeStealth(function(obj, prop) {
        if ((obj === document || obj === Document.prototype) &&
            (prop === 'visibilityState' || prop === 'hidden')) {
            return undefined;
        }
        return originalGetDescriptor.apply(this, arguments);
    }, 'getOwnPropertyDescriptor');

    // 3. PROPERTY SPOOFER (Invisible Lock)
    const silentLock = (obj, prop, value) => {
        Object.defineProperty(obj, prop, {
            get: makeStealth(() => value, prop),
            set: () => {},
            configurable: true // Harus true agar tidak dicurigai sistem
        });
    };

    silentLock(Document.prototype, 'visibilityState', 'visible');
    silentLock(Document.prototype, 'hidden', false);
    silentLock(window, 'innerWidth', window.screen.width);
    silentLock(window, 'innerHeight', window.screen.height);

    // 4. EVENT SILENCER (Capture Phase Hijack)
    // Mencegah ExamTaker mendeteksi Alt-Tab, ESC, atau F11
    const blockList = ['blur', 'visibilitychange', 'fullscreenchange', 'resize'];
    const keyBlock = ['Escape', 'F11', 'F12', 'Tab', 'Meta'];

    const originalAddEventListener = EventTarget.prototype.addEventListener;
    EventTarget.prototype.addEventListener = makeStealth(function(type, listener, options) {
        if (blockList.includes(type)) {
            return; // Jangan izinkan aplikasi memasang satpam untuk event ini
        }

        if (type === 'keydown' || type === 'keyup') {
            const wrappedListener = makeStealth(function(e) {
                if (keyBlock.includes(e.key) || (e.altKey && e.key === 'Tab')) {
                    e.stopImmediatePropagation();
                    return;
                }
                return listener.call(this, e);
            }, 'listener');
            return originalAddEventListener.call(this, type, wrappedListener, options);
        }

        return originalAddEventListener.call(this, type, listener, options);
    }, 'addEventListener');

    // 5. UNLOCK COPY-PASTE
    document.addEventListener('copy', (e) => e.stopImmediatePropagation(), true);
    document.addEventListener('paste', (e) => e.stopImmediatePropagation(), true);
    document.addEventListener('contextmenu', (e) => e.stopImmediatePropagation(), true);

    console.log("%c[Ghost V2.0] Stealth Mode Active. Sistem deteksi Mr. Tio telah dibutakan.", "color: #00ff00; font-weight: bold;");

})();