Create index.html

patch-1
Muhammad Daffa 2020-04-12 20:05:48 +07:00 committed by GitHub
parent ec17b2d896
commit 6268d6e5ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 34 additions and 0 deletions

34
Clickjacking/index.html Normal file
View File

@ -0,0 +1,34 @@
<html>
<head>
<title>Clickjacking Test</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<div class="h1">Test Clickjacking Vulnerability</div>
<div class="form-group">
<label for="URL">URL:</label>
<input type="url" id="url" class="form-control" placeholder="http://sites.com"/>
<small id="textHelp" class="form-text text-muted">Add http:// or https:// in the beginning</small>
</div>
<button id="submit-test" class="btn btn-primary">Test it!</button>
<iframe src="about:blank" id="iframe" frameborder="1" width="100%" height="100%"></iframe>
</div>
</body>
<script>
function frameIt() {
var url = document.getElementById("url").value;
var iframe = document.getElementById("iframe");
iframe.src = url;
}
document.addEventListener('DOMContentLoaded', function () {
document.getElementById('submit-test').addEventListener('click',
function() {
frameIt();
}
);
});
</script>
</html>