-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
187 lines (167 loc) · 6.02 KB
/
index.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Clickjacking PoC</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
<style>
body {
display: flex;
height: 100vh;
margin: 0;
font-family: Arial, sans-serif;
background-color: black;
}
.sidebar {
width: 25%;
background-color: #333;
color: white;
padding: 10px;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
overflow: auto;
position: relative;
}
.sidebar input {
padding: 10px;
font-size: 16px;
margin: 10px 0;
width: 80%;
}
.resize-bar {
background-color: #444;
width: 10px;
cursor: ew-resize;
position: absolute;
top: 0;
bottom: 0;
right: 0;
}
.content {
width: 75%;
padding: 20px;
box-sizing: border-box;
background-color: #f4f4f4;
transition: width 0.2s;
}
iframe {
width: 100%;
height: 80vh;
border: none;
}
.footer {
margin-top: auto;
width: 100%;
padding: 20px 0;
text-align: center;
position: relative;
background-color: black;
}
.footer-divider {
border-top: 1px solid #444;
margin-bottom: 10px;
}
.social-icons {
display: flex;
justify-content: center;
gap: 20px;
}
.social-icons a {
color: white;
font-size: 24px;
text-decoration: none;
transition: color 0.3s;
}
.social-icons a:hover {
color: #1e90ff;
}
.footer-text {
font-size: 20px;
font-weight: bold;
color: white;
font-family: "Courier New", Courier, monospace;
margin-top: 10px;
}
</style>
</head>
<body>
<div class="sidebar" id="sidebar">
<h2 style="font-size: 24px;">Enter Website URL</h2>
<input type="text" id="urlInput" placeholder="Enter website URL" value="https://evil.com/" />
<p style="color: lightgray; font-size: 12px;">Press Enter or edit the input to load the URL.</p>
<!-- Resizable divider bar -->
<div class="resize-bar" id="resizeBar"></div>
<div class="footer">
<div class="footer-divider"></div>
<div class="social-icons">
<a href="https://github.com/m14r41" target="_blank" title="GitHub">
<i class="fab fa-github"></i>
</a>
<a href="https://www.linkedin.com/in/M14R41/" target="_blank" title="LinkedIn">
<i class="fab fa-linkedin"></i>
</a>
<a href="https://twitter.com/m14_r41" target="_blank" title="Twitter">
<i class="fab fa-twitter"></i>
</a>
</div>
<div class="footer-text">By: Madhurendra</div>
</div>
</div>
<div class="content" id="content">
<h2 style="font-weight: bold; color: black">Clickjacking Vulnerability PoC</h2>
<p style="font-weight: bold; color: rgb(146, 83, 83)">This vulnerability presents a security risk, allowing for potential manipulation of user interactions and unauthorized data access without user consent.</p>
<iframe id="iframeContent" src="http://testphp.vulnweb.com/" title="Clickjacking PoC"></iframe>
</div>
<script>
function loadCustomURL() {
let url = document.getElementById("urlInput").value.trim();
// Ensure the URL starts with http:// or https://
if (!url.match(/^https?:\/\//)) {
url = "http://" + url;
}
// Update the iframe source
const iframe = document.getElementById("iframeContent");
iframe.src = url;
}
// Automatically load the initial URL and listen for input changes
document.addEventListener("DOMContentLoaded", () => {
const urlInput = document.getElementById("urlInput");
const iframe = document.getElementById("iframeContent");
// Load the initial URL
loadCustomURL();
// Reload iframe immediately after pressing Enter or modifying input
urlInput.addEventListener("input", loadCustomURL);
});
let isResizing = false;
let lastDownX = 0;
const resizeBar = document.getElementById("resizeBar");
const sidebar = document.getElementById("sidebar");
const content = document.getElementById("content");
resizeBar.addEventListener('mousedown', (e) => {
isResizing = true;
lastDownX = e.clientX;
document.addEventListener('mousemove', handleMouseMove);
document.addEventListener('mouseup', stopResizing);
});
function handleMouseMove(e) {
if (!isResizing) return;
let offset = e.clientX - lastDownX;
let newWidth = sidebar.offsetWidth + offset;
if (newWidth >= 200 && newWidth <= window.innerWidth - 100) {
sidebar.style.width = newWidth + 'px';
content.style.width = (window.innerWidth - newWidth) + 'px';
lastDownX = e.clientX;
}
}
function stopResizing() {
isResizing = false;
document.removeEventListener('mousemove', handleMouseMove);
document.removeEventListener('mouseup', stopResizing);
}
</script>
</body>
</html>