-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebweaver.py
More file actions
120 lines (92 loc) · 3.74 KB
/
Copy pathwebweaver.py
File metadata and controls
120 lines (92 loc) · 3.74 KB
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
#!/usr/bin/env python3
# made by @94yh on discord
import requests
from urllib.parse import urlparse
import time
import os
import colorama
import cmd
import sys
import socket
from bs4 import BeautifulSoup
def website_info(url):
if not url.startswith(("http://", "https://")):
url = "https://" + url
try:
start = time.time()
response = requests.get(
url,
timeout=10,
headers={
"User-Agent": "Mozilla/5.0"
}
)
end = time.time()
parsed = urlparse(response.url)
domain = parsed.netloc
try:
ip = socket.gethostbyname(domain)
except:
ip = "Could not resolve"
soup = BeautifulSoup(response.text, "html.parser")
title = soup.title.string if soup.title else "No title found"
print("\n><><><> WEBSITE-INFO <><><><")
print("Domain:", domain)
print("IP Address:", ip)
print("Final URL:", response.url)
print("Status Code:", response.status_code)
print("Page Title:", title.strip())
print("Server:", response.headers.get("Server", "Hidden"))
print("Content Type:", response.headers.get("Content-Type"))
print("Content Length:", response.headers.get("Content-Length", "Unknown"))
print("Response Time:", round(end-start, 2), "seconds")
print("\n<><>< SECURITY-HEADERS ><><>")
print("HSTS:", response.headers.get("Strict-Transport-Security", "Missing"))
print("CSP:", response.headers.get("Content-Security-Policy", "Missing"))
print("X-Frame:", response.headers.get("X-Frame-Options", "Missing"))
print("<><><><><><><><><><><><><><>\n")
except requests.exceptions.RequestException as e:
print("Error: incorrect url or command")
def banner():
import time
import os
banner = fr"""{colorama.Fore.GREEN}
⠀⠀⠀⡠⠀⡌⠀⠀⠀⠀⠀⠀⠀⠀⢡⠀⢄⠀⠀⠀
⠀⠀⣰⠃⣸⠁⠀⠀⠀⠀⠀⠀⠀⠀⠈⣇⠘⣆⠀⠀
⠀⢀⡏⢠⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⡄⢹⡀⠀
⠀⣸⡇⠘⠷⢖⣒⡲⣤⣤⣤⣤⢖⣒⡲⠾⠃⢸⣇⠀
⠀⠻⠷⠚⠋⣩⡭⢭⣿⣿⣿⣿⡭⢭⣍⠙⠓⠾⠟⠀
⠀⠀⢀⣠⠞⢉⣴⠏⣽⣿⣿⣯⠹⣦⡍⠳⣄⡀⠀⠀
⣤⡴⠋⠁⠀⢸⣿⠀⢸⣿⣿⡏⠀⣿⡇⠀⠈⠙⢶⣤
⢹⡇⠀⠀⠀⢸⣿⠀⠈⣿⣿⠁⠀⣿⡇⠀⠀⠀⢸⡟
⠸⡇⠀⠀⠀⠀⣿⠀⠀⠘⠃⠀⠀⣿⠁⠀⠀⠀⢸⡇
⠀ ⢷⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⡾⠀
⠀⠘⡄⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⢠⠃⠀
⠀⠀⠐⠀⠀⠀⠈⠇⠀⠀⠀⠀⢸⠁⠀⠀⠀⠂⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠘⠄⠀⠀⠠⠃⠀⠀⠀⠀⠀⠀⠀
__ _____ ___ __ _____ ___ _____ ___
\ \ / / __| _ )__\ \ / / __| /_\ \ / / __| _ \
\ \/\/ /| _|| _ \___\ \/\/ /| _| / _ \ V /| _|| /
\_/\_/ |___|___/ \_/\_/ |___/_/ \_\_/ |___|_|_\ V1.0
MADE BY: @proudtobegreek8 ON TIKTOK
@94yh ON DISCORD
L3V1"""
print(banner)
def prompt():
while True:
text = f"""{colorama.Fore.GREEN}
┌──(Web㉿Weaver)-[~]
└─$ """
cmd = input(text)
if cmd == "exit":
os._exit(0)
elif cmd == "help":
print("type in a website url (example.com)")
print("to get info on it")
print("type (exit) to exit the tool")
return prompt()
website_info(cmd)
return input(text)
banner()
while True:
cmd = prompt()