Created
October 30, 2021 09:18
-
-
Save carlosvillasanchez/c3a56cacb23ba4754bb77f0efd43f41e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener("DOMContentLoaded", function () { | |
jsCode = `)]}'` + new URL(location.href).searchParams.get("xss"); | |
lastElementOfBody = document.getElementById("body").lastElementChild; | |
if (lastElementOfBody.id === "intigriti") { | |
lastElementOfIntigriti = lastElementOfBody.lastElementChild; | |
htmlOfLastElementOfIntigriti = lastElementOfIntigriti.innerHTML.trim(); | |
jsPrefix = htmlOfLastElementOfIntigriti.substr(htmlOfLastElementOfIntigriti.length - 4); | |
jsCode = jsPrefix + jsCode; | |
} | |
let scriptTag = document.createElement("script"); | |
scriptTag.type = "text/javascript"; | |
scriptTag.appendChild(document.createTextNode(jsCode)); | |
document.body.appendChild(scriptTag); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment