Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 155221e

Browse filesBrowse files
Add files via upload
1 parent e3d8f4a commit 155221e
Copy full SHA for 155221e

File tree

Expand file treeCollapse file tree

2 files changed

+61
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+61
-0
lines changed
Open diff view settings
Collapse file
+57Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
from urllib.request import urlopen
2+
from sys import argv,exit
3+
4+
__author__="Cyber Asset - Abhinav Porwal"
5+
6+
def checking(url):
7+
"to check if url is vulnerable or not"
8+
9+
try:
10+
if "http" not in url:
11+
url="http://"+url
12+
data=urlopen(url)
13+
headers=data.info()
14+
if "X-Frame-Options" not in headers:
15+
return True
16+
except:
17+
return False
18+
19+
20+
def proof(url):
21+
payload="""
22+
<html>
23+
<head>
24+
<title>Click Jacking Test Page</title>
25+
</head>
26+
<body>
27+
<p>Website is Vulerable to clickjacking...</p>
28+
<iframe src="http://{}" width="500" height="500"></iframe>
29+
30+
</body>
31+
</html> """.format(url)
32+
with open(url +".html" ,"w") as file:
33+
file.write(payload)
34+
file.close()
35+
36+
def main():
37+
try:
38+
sites=open(argv[1] , 'r').readlines()
39+
except:
40+
print("[*] Usage: python(3) clickjacking.py <file_name>");exit(0)
41+
42+
for site in sites[0:]:
43+
print("[*] Checking " + site)
44+
status=checking(site)
45+
46+
if(status):
47+
print(" [+] Website is Vulnerable!!")
48+
proof(site.split('\n')[0])
49+
50+
print(" [+] Proof Created and Saved as <URL>.html\n")
51+
elif not status:
52+
print(" [-] Website is not Vulnerable!\n")
53+
54+
else:
55+
print("Python Crashed please Re-Launch")
56+
57+
if __name__=='__main__':main()
Collapse file

‎ClickJacking Bug Testing/test.txt‎

Copy file name to clipboard
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
www.google.com
2+
www.facebook.com
3+
www.amazon.com
4+
www.cobaltstrike.com

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.