-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck_dps.py
More file actions
56 lines (47 loc) · 1.74 KB
/
check_dps.py
File metadata and controls
56 lines (47 loc) · 1.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
import subprocess
import sys
from shutil import which
def check_command(cmd):
return which(cmd) is not None
def install_sublist3r():
print("[*] Installing sublist3r via pip...")
subprocess.check_call([sys.executable, "-m", "pip", "install", "sublist3r"])
def main():
tools = {
"amass": False,
"masscan": False,
"nmap": False,
"httpx": False,
"sublist3r": False
}
print("Checking required tools...")
for tool in tools.keys():
if check_command(tool):
print(f"[+] {tool} found.")
tools[tool] = True
else:
print(f"[-] {tool} NOT found.")
if not tools["sublist3r"]:
try:
install_sublist3r()
tools["sublist3r"] = True
except Exception as e:
print(f"[-] Failed to install sublist3r automatically: {e}")
print("\nSummary:")
for tool, installed in tools.items():
print(f" {tool}: {'Installed' if installed else 'Missing'}")
missing = [t for t, installed in tools.items() if not installed]
if missing:
print("\nPlease manually install the missing tools:")
if "amass" in missing:
print(" - Amass: https://github.com/OWASP/Amass#installation")
if "masscan" in missing:
print(" - Masscan: https://github.com/robertdavidgraham/masscan#installation")
if "nmap" in missing:
print(" - Nmap: https://nmap.org/download.html")
if "httpx" in missing:
print(" - Httpx: https://github.com/projectdiscovery/httpx#installation")
else:
print("\nAll required tools are installed. You're good to go!")
if __name__ == "__main__":
main()