-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathClickJacking.html
30 lines (26 loc) · 1.01 KB
/
ClickJacking.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
<html>
<head>
<title>Clickjack test page</title>
<script>
function check(input) {
var iframe = document.createElement('iframe');
iframe.src = input.value;
iframe.setAttribute('style', 'width:100%; height:100%; margin:0px');
//iframe.setAttribute('sandbox', 'allow-forms');
document.body.innerHTML = '';
document.body.appendChild(iframe);
var a = document.createElement('div');
//a.setAttribute('style', 'width:100%; height:100%; position:absolute;top:0px;left:0px');
//a.addEventListener('click',()=>alert('Loaded in Frame'));
//document.body.appendChild(a);
}
</script>
</head>
<body>
<p>Website is vulnerable to clickjacking!</p>
<input type="text">
<button onclick="check(this.previousElementSibling)" />View</button>
<br />
<!-- <iframe src="https://twitter.com/" width="500" height="500"></iframe> -->
</body>
</html>