-
Notifications
You must be signed in to change notification settings - Fork 26
Description
import subprocess
subprocess.call("clear", shell=True)
print (",_____ ")
print ("| | __ ___ __ _ _ __ ___ ")
print ("| | | ' _ \ / _ | ' ` _ \ ")
print ("| || | | | | | (| | | | | | |")
print ("|_____|| || ||_,|| || ||")
import socket
import requests
def get_ip_address(domain):
try:
ip_address = socket.gethostbyname(domain)
return ip_address
except socket.gaierror:
return None
def scan_ports(ip_address):
open_ports = []
common_ports = [21, 22, 80, 443, 3389]
for port in common_ports:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(1)
result = sock.connect_ex((ip_address, port))
if result == 0:
open_ports.append(port)
sock.close()
return open_ports
def check_directory(domain, directory):
url = f"http://{domain}/{directory}"
try:
response = requests.get(url, timeout=5)
if response.status_code == 200:
return True
except requests.RequestException:
pass
return False
website_domain = input("Enter the website domain: ")
ip_address = get_ip_address(website_domain)
if ip_address:
print(f"The IP address of {website_domain} is: {ip_address}")
open_ports = scan_ports(ip_address)
if open_ports:
print("Open ports:")
for port in open_ports:
print(f"- Port {port} is open")
directories_to_check = ["index", "images", "download", "2006", "news", "crack", "serial", "warez", "full", "12", "contact", "about", "search", "spacer", "privacy", "11", "logo", "blog", "new", "10", "cgi-bin", "faq", "rss", "home", "img", "default", "2005", "products", "sitemap", "archives", "1", "09", "links", "01", "08", "06", "2", "07", "login", "articles", "support", "05", "keygen", "article", "04", "03", "help", "events", "archive", "02", "register", "en", "forum", "software", "downloads", "3", "security", "13", "category", "4", "content", "14", "main", "15", "press", "media", "templates", "services", "icons", "resources", "info", "profile", "16", "2004", "18", "docs", "contactus", "html", "features", "files", "20", "21", "5", "22", "page", "6", "misc", "19", "partners", "24", "terms", "2007", "23", "i", "17", "27", "26", "top", "9", "legal", "30", "banners", "xml", "29", "28", "7", "tools", "projects", "25", "0", "user", "feed", "themes", "linux", "forums", "jobs", "business", "8", "video", "email", "books", "banner", "reviews", "view", "graphics", "research", "feedback", "print", "pdf", "ads", "modules", "2003", "company", "blank", "pub", "games", "copyright", "common", "site", "comments", "people", "aboutus", "product", "sports", "logos", "buttons", "english", "story", "image", "uploads", "31", "subscribe", "blogs", "gallery", "atom", "newsletter", "stats", "music", "careers", "pages", "publications", "technology", "calendar", "stories", "photos", "papers", "community", "data", "history", "arrow", "submit", "www", "s", "web", "library", "wiki", "header", "education", "go", "internet", "in", ".ssh", "advertise", "a", "spam", ".passwd"]
print("\nChecking directories:")
for directory in directories_to_check:
if check_directory(website_domain, directory):
print(f"- Directory '{directory}' exists")
else:
print("No open ports found")
else:
print(f"Failed to resolve the IP address of {website_domain}")