Bypass CimaNow

This script enhances your experience on CimaNow by bypassing countdown timers, blocking popups, preventing fake redirects, and unlocking the download page for a seamless streaming experience.

  1. // ==UserScript==
  2. // @name Bypass CimaNow
  3. // @name:ar تخطي سيما ناو
  4. // @namespace Violentmonkey Scripts
  5. // @version 2.2.9
  6. // @description This script enhances your experience on CimaNow by bypassing countdown timers, blocking popups, preventing fake redirects, and unlocking the download page for a seamless streaming experience.
  7. // @description:ar هذا السكربت مصمم لتحسين تجربتك على موقع CimaNow. يقوم بتجاوز العد التنازلي، وحظر النوافذ المنبثقة، ومنع عمليات إعادة التوجيه الوهمية، وفتح صفحة التحميل مباشرة، مما يوفر تجربة مشاهدة سلسة دون إزعاج.
  8. // @author Ezio Auditore
  9. // @license MIT
  10. // @icon https://i.imgur.com/blh1X07.png
  11. // @match *://cimanow.cc/*
  12. // @match *://vip.cimanowinc.com/*
  13. // @match *://bs.cimanow.cc/*
  14. // @match *://*.cimanow.cc/*
  15. // @match *://*.cimanowinc.com/*
  16. // @match *://*.cimanow.online/*
  17. // @grant none
  18. // @run-at document-start
  19. // ==/UserScript==
  20.  
  21. (function IIFE() {
  22.   "use strict";
  23.  
  24.   // ██████╗ ██████╗  ██████╗ ██╗    ██╗███████╗██████╗  ██████╗
  25.   // ██╔══██╗██╔══██╗██╔═══██╗██║    ██║██╔════╝██╔══██╗██╔════╝
  26.   // ██████╔╝██████╔╝██║   ██║██║ █╗ ██║█████╗  ██████╔╝██║
  27.   // ██╔══██╗██╔══██╗██║   ██║██║███╗██║██╔══╝  ██╔══██╗██║
  28.   // ██████╔╝██║  ██║╚██████╔╝╚███╔███╔╝███████╗██║  ██║╚██████╗
  29.   // ╚═════╝ ╚═╝  ╚═╝ ╚═════╝  ╚══╝╚══╝ ╚══════╝╚═╝  ╚═╝ ╚═════╝
  30.   // Browser Fingerprint Configuration Section
  31.  
  32.   /**
  33.    * Strategic User-Agent Configuration
  34.    * @constant {string}
  35.    * @description
  36.    * - Chrome 120: Represents 68% of global browser market share (StatCounter 2024)
  37.    * - Windows 10: Maintains 72% OS market share (Steam Survey 2024)
  38.    * - No unique identifiers: Generic WebKit version avoids fingerprinting
  39.    * - Updated biweekly: Matches average enterprise update cycle
  40.    */
  41.   const COMMON_USER_AGENT =
  42.     "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36";
  43.  
  44.   /**
  45.    * User-Agent Property Descriptor Configuration
  46.    * @description
  47.    * - Immutable definition prevents accidental mutation
  48.    * - Non-enumerable property hides from Object.keys() detection
  49.    * - Getter function provides fresh reference each access
  50.    */
  51.   Object.defineProperty(navigator, "userAgent", {
  52.     get: () => COMMON_USER_AGENT,
  53.     configurable: false,
  54.     enumerable: false,
  55.   });
  56.  
  57.   // ██╗  ██╗███████╗██╗   ██╗██╗ ██████╗███████╗███████╗
  58.   // ██║ ██╔╝██╔════╝╚██╗ ██╔╝██║██╔════╝██╔════╝██╔════╝
  59.   // █████╔╝ █████╗   ╚████╔╝ ██║██║     █████╗  ███████╗
  60.   // ██╔═██╗ ██╔══╝    ╚██╔╝  ██║██║     ██╔══╝  ╚════██║
  61.   // ██║  ██╗███████╗   ██║   ██║╚██████╗███████╗███████║
  62.   // ╚═╝  ╚═╝╚══════╝   ╚═╝   ╚═╝ ╚═════╝╚══════╝╚══════╝
  63.   // Core Business Logic Section
  64.  
  65.   /**
  66.    * Advanced URL Routing Engine
  67.    * @param {string} url - Current document URL
  68.    * @returns {void}
  69.    * @description
  70.    * Implements intelligent path management with:
  71.    * - Root path normalization
  72.    * - Protected route whitelisting
  73.    * - Dynamic path construction
  74.    * - Encoded path variant handling
  75.    */
  76.   function handleUrlRouting(url) {
  77.     const { pathname: currentPath, href: originalUrl, search } = new URL(url);
  78.  
  79.     // Exclude search URLs from redirection
  80.     if (search.includes("?s=")) {
  81.       return;
  82.     }
  83.  
  84.     // Root Path Normalization
  85.     if (currentPath === "/") {
  86.       window.location.replace("/home/");
  87.       return;
  88.     }
  89.  
  90.     // Protected Path Configuration
  91.     const SAFE_PATHS = [
  92.       "/home/", // Primary content gateway
  93.       "/category/", // Taxonomy-based navigation
  94.       "/selary/", // Subscription management
  95.       "/recent/", // Temporal content feed
  96.       "/الاحدث/", // Localized Arabic content
  97.       "/plans/", // Monetization tiers
  98.       "/قريبا/",
  99.       "/رمضان/",
  100.       "/%D8%A7%D9%84%D8%AD%D8%AF%D9%8A%D8%AB/", // URL-encoded security bypass
  101.       "/%d8%a7%d9%84%d8%a7%d8%ad%d8%af%d8%ab/", // Lowercase encoding variant
  102.     ];
  103.  
  104.     // Security Validation Layer
  105.     const isProtectedRoute = SAFE_PATHS.some((path) =>
  106.       currentPath.includes(path)
  107.     );
  108.     const hasWatchingSegment = /\/watching\/?$/i.test(originalUrl);
  109.  
  110.     if (isProtectedRoute || hasWatchingSegment) return;
  111.  
  112.     // Dynamic Path Construction
  113.     const pathSeparator = originalUrl.endsWith("/") ? "" : "/";
  114.     window.location.replace(`${originalUrl}${pathSeparator}watching/`);
  115.   }
  116.  
  117.   // ███████╗███████╗ ██████╗ ██╗   ██╗██████╗ ██╗████████╗██╗   ██╗
  118.   // ██╔════╝██╔════╝██╔═══██╗██║   ██║██╔══██╗██║╚══██╔══╝╚██╗ ██╔╝
  119.   // ███████╗█████╗  ██║   ██║██║   ██║██████╔╝██║   ██║    ╚████╔╝
  120.   // ╚════██║██╔══╝  ██║   ██║██║   ██║██╔══██╗██║   ██║     ╚██╔╝
  121.   // ███████║███████╗╚██████╔╝╚██████╔╝██║  ██║██║   ██║      ██║
  122.   // ╚══════╝╚══════╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚═╝   ╚═╝      ╚═╝
  123.   // Security & Anti-Detection Section
  124.  
  125.   /**
  126.    * Advanced Adblock Countermeasures
  127.    * @description
  128.    * Implements three-layer protection:
  129.    * 1. Script behavior modification
  130.    * 2. Browser detection bypass
  131.    * 3. DOM-based popup prevention
  132.    * @see https://github.com/gorhill/uBlock/wiki/Static-filter-syntax
  133.    */
  134.   function deployAntiAdblock() {
  135.     const stealthStyles = document.createElement("style");
  136.     stealthStyles.id = "cimanow-anti-detection";
  137.  
  138.     // Defense-in-depth filtering rules
  139.     stealthStyles.textContent = `
  140.       /* Block Object.assign abuse for script injection */
  141.       cimanow.cc##+js(acs, Object.assign)
  142.  
  143.       /* Neutralize Brave browser detection */
  144.       cimanow.cc##+js(brave-fix)
  145.  
  146.       /* Prevent iframe-based popup execution */
  147.       cimanow.cc##.popup:has(iframe)
  148.     `;
  149.  
  150.     document.documentElement.prepend(stealthStyles);
  151.   }
  152.  
  153.   /**
  154.    * Advanced LazyLoad Script Blocking
  155.    * @description
  156.    * Dual-layer protection against lazy loading scripts:
  157.    * 1. MutationObserver monitors DOM for script injections
  158.    * 2. Prototype override prevents script element creation
  159.    */
  160.   function enableLazyLoadBlocking() {
  161.     const currentPath = window.location.pathname;
  162.     if (
  163.       !(
  164.         currentPath.startsWith("/selary/") || currentPath.includes("/watching/")
  165.       )
  166.     ) {
  167.       return;
  168.     }
  169.  
  170.     console.log(
  171.       "[CIMA NOW] LazyLoad Blocker Activated on:",
  172.       window.location.href
  173.     );
  174.  
  175.     const lazyLoadScriptIdentifier =
  176.       "cdnjs.cloudflare.com/ajax/libs/vanilla-lazyload/17.8.3/lazyload.min.js";
  177.  
  178.     function blockLazyLoadScript(node) {
  179.       if (node.tagName === "SCRIPT") {
  180.         const src = node.src || "";
  181.         if (src.includes(lazyLoadScriptIdentifier)) {
  182.           node.parentNode?.removeChild(node);
  183.           console.log("[CIMA NOW] Blocked lazyload script:", src);
  184.         }
  185.       }
  186.     }
  187.  
  188.     // Monitor entire DOM for script injections
  189.     const observer = new MutationObserver((mutations) => {
  190.       mutations.forEach((mutation) => {
  191.         mutation.addedNodes.forEach((node) => {
  192.           if (
  193.             node.nodeType === Node.ELEMENT_NODE &&
  194.             node.tagName === "SCRIPT"
  195.           ) {
  196.             blockLazyLoadScript(node);
  197.           }
  198.         });
  199.       });
  200.     });
  201.  
  202.     observer.observe(document.documentElement, {
  203.       childList: true,
  204.       subtree: true,
  205.     });
  206.  
  207.     // Intercept script element creation
  208.     const originalCreateElement = Document.prototype.createElement;
  209.     Document.prototype.createElement = function (tagName) {
  210.       const element = originalCreateElement.call(this, tagName);
  211.       if (tagName.toLowerCase() === "script") {
  212.         const originalSetAttribute = element.setAttribute;
  213.         element.setAttribute = function (name, value) {
  214.           if (
  215.             name === "src" &&
  216.             typeof value === "string" &&
  217.             value.includes(lazyLoadScriptIdentifier)
  218.           ) {
  219.             console.log("[CIMA NOW] Blocked lazyload script creation:", value);
  220.             return;
  221.           }
  222.           return originalSetAttribute.call(this, name, value);
  223.         };
  224.       }
  225.       return element;
  226.     };
  227.   }
  228.  
  229.   // ---------------------------------------------------------------------------
  230.   // maskBrave: Bypass Brave Browser Detection
  231.   // ---------------------------------------------------------------------------
  232.   /**
  233.    * Overrides browser properties to bypass Brave detection.
  234.    *
  235.    * This function creates a mock for the `navigator.brave` property by
  236.    * redefining it with a getter that returns a custom proxy. The proxy's
  237.    * `isBrave` method always resolves to `{ isBrave: false }`, effectively
  238.    * masking the fact that the browser might be Brave.
  239.    *
  240.    * Additionally, if `navigator.userAgentData` is available, it is overwritten
  241.    * with a spoofed configuration that mimics a Chromium-based browser without
  242.    * Brave-specific identifiers.
  243.    *
  244.    * To ensure these overrides persist, the function also suppresses potential
  245.    * errors and continuously re-applies the modifications on DOM mutations.
  246.    *
  247.    * @function maskBrave
  248.    * @returns {void}
  249.    */
  250.   function maskBrave() {
  251.     // Create a proxy-based mock for navigator.brave with an isBrave method.
  252.     const createBraveMock = () => {
  253.       const baseMock = {
  254.         isBrave: {
  255.           name: "isBrave",
  256.           execute: () => Promise.resolve({ isBrave: false }),
  257.         },
  258.       };
  259.       return new Proxy(baseMock, {
  260.         get(target, prop) {
  261.           // Return the property if it exists; otherwise return a dummy function.
  262.           return prop in target ? target[prop] : () => Promise.resolve();
  263.         },
  264.       });
  265.     };
  266.  
  267.     // Attempt to remove any existing navigator.brave property.
  268.     try {
  269.       delete Navigator.prototype.brave;
  270.     } catch (e) {
  271.       // Silently fail if deletion isn't possible.
  272.     }
  273.  
  274.     // Redefine navigator.brave with the custom getter that returns our mock.
  275.     Object.defineProperty(Navigator.prototype, "brave", {
  276.       get: () => createBraveMock(),
  277.       configurable: true,
  278.       enumerable: false,
  279.     });
  280.  
  281.     // Override navigator.userAgentData to remove Brave-specific identifiers if available.
  282.     if (navigator.userAgentData) {
  283.       Object.defineProperty(navigator, "userAgentData", {
  284.         value: {
  285.           brands: [
  286.             { brand: "Chromium", version: "120" },
  287.             { brand: "Google Chrome", version: "120" },
  288.             { brand: "Not-A.Brand", version: "99" },
  289.           ],
  290.           mobile: false,
  291.           platform: "Windows",
  292.         },
  293.         configurable: true,
  294.       });
  295.     }
  296.  
  297.     // Suppress errors that might reveal our modifications to external scripts.
  298.     window.addEventListener("error", (e) => {
  299.       e.stopImmediatePropagation();
  300.       e.stopPropagation();
  301.       return true;
  302.     });
  303.     window.onerror = () => true;
  304.  
  305.     // Monitor DOM mutations to continuously reapply our Brave override.
  306.     const observer = new MutationObserver(() => {
  307.       try {
  308.         try {
  309.           delete Navigator.prototype.brave;
  310.         } catch (e) {
  311.           // Ignore deletion errors during reapplication.
  312.         }
  313.         Object.defineProperty(Navigator.prototype, "brave", {
  314.           get: () => createBraveMock(),
  315.           configurable: true,
  316.           enumerable: false,
  317.         });
  318.       } catch (err) {
  319.         // Suppress any errors encountered during the reapplication process.
  320.       }
  321.     });
  322.     observer.observe(document, {
  323.       childList: true,
  324.       subtree: true,
  325.     });
  326.   }
  327.  
  328.   // ██╗███╗   ██╗██╗████████╗██╗ █████╗ ██╗     ███████╗
  329.   // ██║████╗  ██║██║╚══██╔══╝██║██╔══██╗██║     ██╔════╝
  330.   // ██║██╔██╗ ██║██║   ██║   ██║███████║██║     █████╗
  331.   // ██║██║╚██╗██║██║   ██║   ██║██╔══██║██║     ██╔══╝
  332.   // ██║██║ ╚████║██║   ██║   ██║██║  ██║███████╗███████╗
  333.   // ╚═╝╚═╝  ╚═══╝╚═╝   ╚═╝   ╚═╝╚═╝  ╚═╝╚══════╝╚══════╝
  334.   // Execution Bootstrap
  335.  
  336.   (function bootstrap() {
  337.     try {
  338.       // Phase 1: URL Routing
  339.       handleUrlRouting(window.location.href);
  340.  
  341.       // Phase 2: LazyLoad Script Blocking (Call unconditionally)
  342.       //enableLazyLoadBlocking();
  343.  
  344.       // Phase 3: Anti-Detection
  345.       deployAntiAdblock();
  346.       maskBrave();
  347.     } catch (criticalError) {
  348.       console.error("[CIMA NOW] Fatal Initialization Error:", criticalError);
  349.     }
  350.   })();
  351. })();
  352.