Private ip? yougetsignal? fake bro, this old, give me something new
here the decoded code
import socket
import requests
from colorama import Fore, Style, init
import os
import platform
# Initialize colorama for terminal colors
init(autoreset=True)
# Clear terminal screen function based on OS
def clear():
"""Clear the terminal screen."""
os_name = platform.system().lower()
if os_name == 'windows':
os.system('cls')
else:
os.system('clear')
# Banner Function
def banners():
clear()
logo = f"""
{Fore.LIGHTRED_EX}
██████╗ ██╗ ██╗██████╗ ██████╗ ██████╗ ███████╗███████╗ ██████╗
██╔═████╗╚██╗██╔╝██╔══██╗██╔═══██╗██╔════╝ ██╔════╝██╔════╝██╔════╝
██║██╔██║ ╚███╔╝ ██████╔╝██║ ██║██║ ███╗ ███████╗█████╗ ██║
████╔╝██║ ██╔██╗ ██╔══██╗██║ ██║██║ ██║ ╚════██║██╔══╝ ██║
╚██████╔╝██╔╝ ██╗██████╔╝╚██████╔╝╚██████╔╝ ███████║███████╗╚██████╗
╚═════╝ ╚═╝ ╚═╝╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚══════╝ ╚═════╝
{Fore.YELLOW}
═════════════╦═════════════════════════════════╦═════════════════════════════╗
╔════════════╩═════════════════════════════════╩═════════════════════════════╗
║ {Fore.MAGENTA}• {Fore.WHITE}AUTHOR {Fore.RED} |{Fore.WHITE} 0xBog {Fore.YELLOW}║
║ {Fore.MAGENTA}• {Fore.WHITE}GITHUB {Fore.RED} |{Fore.WHITE} GITHUB.COM/0xBog {Fore.YELLOW}║
╔════════════════════════════════════════════════════════════════════════════╝
║ {Fore.MAGENTA}• {Fore.WHITE}OFFICIAL 0xBog {Fore.RED} |{Fore.WHITE} TELEGRAM.ME/x0bogsecurity {Fore.YELLOW}║
║ {Fore.MAGENTA}• {Fore.WHITE}OFFICIAL TELEGRAM {Fore.RED} |{Fore.WHITE} TELEGRAM.ME/sec0xbog {Fore.YELLOW}║
╚════════════════════════════════════════════════════════════════════════════╝
"""
print(logo)
print(f"{Fore.YELLOW}[0xBog Mass Ip Reverse] - {Fore.GREEN}Reverse IP + Domain Validator")
# Function to get IP from domain
def get_ip_from_domain(domain):
"""Resolve IP for a given domain."""
try:
ip_address = socket.gethostbyname(domain)
print(f"{Fore.YELLOW}IP Address for {domain}: {ip_address}{Style.RESET_ALL}")
return ip_address
except socket.gaierror:
print(f"{Fore.RED}Unable to resolve IP for {domain}{Style.RESET_ALL}")
return None
# Function to get domains using YouGetSignal
def get_domains_from_yougetsignal(ip_address):
"""Fetch domains associated with an IP from API."""
url = '
https://domains.yougetsignal.com/domains.php'
data = {'remoteAddress': ip_address, 'key': ''} # Empty key field
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
try:
response = requests.post(url, data=data, headers=headers)
if response.status_code == 200:
response_data = response.json()
if response_data.get("status") == "Success":
domains = [item[0] for item in response_data.get("domainArray", [])]
print(f"{Fore.GREEN}{len(domains)} domains found through API.{Style.RESET_ALL}")
return domains
else:
print(f"{Fore.RED}Error in API response: {response_data.get('message')}{Style.RESET_ALL}")
return []
else:
print(f"{Fore.RED}Error with API: {response.status_code}{Style.RESET_ALL}")
return []
except Exception as e:
print(f"{Fore.RED}Error connecting to API: {e}{Style.RESET_ALL}")
return []
# Function to check HTTP status and CMS
def get_http_status_and_cms(domain):
"""Get HTTP status and CMS type for the domain."""
url = f"http://{domain}" # Assuming HTTP, could be adjusted to HTTPS
try:
response = requests.head(url, timeout=5)
status_code = response.status_code
# Basic CMS detection
cms = "Unknown"
server = response.headers.get("Server", "").lower()
x_powered_by = response.headers.get("X-Powered-By", "").lower()
if "wordpress" in server or "wordpress" in x_powered_by:
cms = "WordPress"
elif "drupal" in server or "drupal" in x_powered_by:
cms = "Drupal"
elif "joomla" in server or "joomla" in x_powered_by:
cms = "Joomla"
elif "wix" in server:
cms = "Wix"
elif "shopify" in server:
cms = "Shopify"
elif "squarespace" in server:
cms = "Squarespace"
elif "cloudflare" in server:
cms = "Cloudflare"
return status_code, cms
except requests.RequestException:
return "Error", "Not accessible"
# Main function to process reverse IP domain check
def reverse_ip_domain_check(domain_or_ip):
"""Perform reverse IP domain lookup and check HTTP status and CMS."""
# Check if input is an IP or domain
if domain_or_ip.replace('.', '').isdigit():
ip_address = domain_or_ip
else:
ip_address = get_ip_from_domain(domain_or_ip)
if not ip_address:
print(f"{Fore.RED}Unable to get a valid IP address.{Style.RESET_ALL}")
return []
# Call YouGetSignal API
print(f"{Fore.CYAN}Fetching domains for IP {ip_address}...{Style.RESET_ALL}")
domains = get_domains_from_yougetsignal(ip_address)
# Ensure Result directory exists
os.makedirs('Result', exist_ok=True)
result_file_path = 'Result/domains.txt'
# Process and save results (only 200 OK domains)
with open(result_file_path, 'a') as result_file:
if domains:
for domain in domains:
status_code, cms = get_http_status_and_cms(domain)
# Only save domains with 200 OK status
if isinstance(status_code, int) and status_code == 200:
result_file.write(f"{domain}\n")
print(f"{Fore.CYAN}[ {domain} ] -- {Fore.GREEN}200 OK{Style.RESET_ALL}")
else:
print(f"{Fore.RED}No domains found for {domain_or_ip}.{Style.RESET_ALL}")
print(f"{Fore.GREEN}Results saved in {result_file_path}{Style.RESET_ALL}")
return domains
# Function to process IPs from a file
def process_ips_from_file(file_path):
"""Process multiple IPs from a file."""
try:
with open(file_path, 'r') as file:
ip_list = file.readlines()
for ip in ip_list:
ip = ip.strip()
if ip:
reverse_ip_domain_check(ip)
except FileNotFoundError:
print(f"{Fore.RED}The file {file_path} was not found.{Style.RESET_ALL}")
# Main execution
if __name__ == "__main__":
banners()
# Ask for the file containing IPs
file_name = input(f"{Fore.YELLOW}Enter the path to the file containing IPs: {Fore.WHITE}")
process_ips_from_file(file_name)