import subprocess
def find_subdomains(domain):
try:
result = subprocess.check_output(["sublist3r", "-d", domain], text=True)
print("Subdomains found:")
print(result)
with open("domains.txt", "w") as file:
file.write(result)
except Exception as e:
print(f"Error: {e}")
domain = input("Enter the target domain: ")
find_subdomains(domain)