Create index.html
parent
ec17b2d896
commit
6268d6e5ce
|
@ -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>
|
Loading…
Reference in New Issue