diff --git a/probuster/__init__.py b/probuster/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/probuster/__pycache__/__init__.cpython-311.pyc b/probuster/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000..ccb18c5 Binary files /dev/null and b/probuster/__pycache__/__init__.cpython-311.pyc differ diff --git a/probuster/__pycache__/__init__.py b/probuster/__pycache__/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/probuster/__pycache__/handler.cpython-311.pyc b/probuster/__pycache__/handler.cpython-311.pyc new file mode 100644 index 0000000..e4e1c1d Binary files /dev/null and b/probuster/__pycache__/handler.cpython-311.pyc differ diff --git a/probuster/__pycache__/probuster.cpython-311.pyc b/probuster/__pycache__/probuster.cpython-311.pyc new file mode 100644 index 0000000..9fb14d4 Binary files /dev/null and b/probuster/__pycache__/probuster.cpython-311.pyc differ diff --git a/probuster/modules/__init__.py b/probuster/modules/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/probuster/modules/__pycache__/__init__.cpython-311.pyc b/probuster/modules/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000..1b9d28f Binary files /dev/null and b/probuster/modules/__pycache__/__init__.cpython-311.pyc differ diff --git a/probuster/modules/__pycache__/__init__.py b/probuster/modules/__pycache__/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/probuster/modules/__pycache__/handler.cpython-311.pyc b/probuster/modules/__pycache__/handler.cpython-311.pyc new file mode 100644 index 0000000..1730929 Binary files /dev/null and b/probuster/modules/__pycache__/handler.cpython-311.pyc differ diff --git a/probuster/modules/banner/__init__.py b/probuster/modules/banner/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/probuster/modules/banner/__pycache__/__init__.cpython-311.pyc b/probuster/modules/banner/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000..0c47975 Binary files /dev/null and b/probuster/modules/banner/__pycache__/__init__.cpython-311.pyc differ diff --git a/probuster/modules/banner/__pycache__/__init__.py b/probuster/modules/banner/__pycache__/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/probuster/modules/banner/__pycache__/banner.cpython-311.pyc b/probuster/modules/banner/__pycache__/banner.cpython-311.pyc new file mode 100644 index 0000000..7b37e99 Binary files /dev/null and b/probuster/modules/banner/__pycache__/banner.cpython-311.pyc differ diff --git a/probuster/modules/banner/banner.py b/probuster/modules/banner/banner.py new file mode 100644 index 0000000..c18206f --- /dev/null +++ b/probuster/modules/banner/banner.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python3 +from colorama import Fore,Back,Style +from art import * +import random +import random + + + +red = Fore.RED + +green = Fore.GREEN + +magenta = Fore.MAGENTA + +cyan = Fore.CYAN + +mixed = Fore.RED + Fore.BLUE + +blue = Fore.BLUE + +yellow = Fore.YELLOW + +white = Fore.WHITE + +reset = Style.RESET_ALL + +bold = Style.BRIGHT + +colors = [ green, cyan, blue] + +random_color = random.choice(colors) + + +def banner(): + + tool_name = "ProBuster" + + fonts = [ + "block", "caligraphy", "colossal", "block", "doh", "small", "smscript", "slant", "term", + "smslant", "shadow", "graffiti", "standard", "big", "blockhead", "ogre", "script"] + selected_font = random.choice(fonts) + banner = text2art(f"{tool_name}", font=selected_font) + + banner = f"""{banner} + + {bold}{white}Author : D.SanjaiKumar @CyberRevoltSecurities{reset}\n""" + + + + return banner diff --git a/probuster/modules/cli/__init__.py b/probuster/modules/cli/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/probuster/modules/cli/__pycache__/__init__.cpython-311.pyc b/probuster/modules/cli/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000..d0cad4d Binary files /dev/null and b/probuster/modules/cli/__pycache__/__init__.cpython-311.pyc differ diff --git a/probuster/modules/cli/__pycache__/__init__.py b/probuster/modules/cli/__pycache__/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/probuster/modules/cli/__pycache__/cli.cpython-311.pyc b/probuster/modules/cli/__pycache__/cli.cpython-311.pyc new file mode 100644 index 0000000..0e310d3 Binary files /dev/null and b/probuster/modules/cli/__pycache__/cli.cpython-311.pyc differ diff --git a/probuster/modules/cli/__pycache__/cli2.cpython-311.pyc b/probuster/modules/cli/__pycache__/cli2.cpython-311.pyc new file mode 100644 index 0000000..b4e83b7 Binary files /dev/null and b/probuster/modules/cli/__pycache__/cli2.cpython-311.pyc differ diff --git a/probuster/modules/cli/cli.py b/probuster/modules/cli/cli.py new file mode 100644 index 0000000..468d87a --- /dev/null +++ b/probuster/modules/cli/cli.py @@ -0,0 +1,164 @@ +#!/usr/bin/env python3 +from colorama import Fore,Back,Style +import argparse +import time as t +import random + + +red = Fore.RED + +green = Fore.GREEN + +magenta = Fore.MAGENTA + +cyan = Fore.CYAN + +mixed = Fore.RED + Fore.BLUE + +blue = Fore.BLUE + +yellow = Fore.YELLOW + +white = Fore.WHITE + +reset = Style.RESET_ALL + +bold = Style.BRIGHT + +colors = [ green, cyan, blue] + +random_color = random.choice(colors) + + +def cli(): + + try: + + parser = argparse.ArgumentParser(add_help=False,usage=argparse.SUPPRESS,exit_on_error=False ) + + parser.add_argument("-h", "--help", action="store_true") + + subparser = parser.add_subparsers(dest="mode", metavar="mode") + + dir = subparser.add_parser("dir", add_help=False, usage=argparse.SUPPRESS, exit_on_error=False) + + dir.add_argument("-dh", "--dir-help", action="store_true") + + dir.add_argument("-c", "--concurrency", type=int, default=20) + + dir.add_argument("-u", "--url", type=str) + + dir.add_argument("-nc", "--no-color", action="store_true") + + dir.add_argument("-w", "--wordlist", type=str) + + dir.add_argument("-pX", "--proxy", type=str) + + dir.add_argument("-o", "--output", type=str) + + dir.add_argument("-v", "--verbose", action="store_true") + + dir.add_argument("-t", "--title",action="store_true") + + dir.add_argument("-tO", "--timeout", type=int) + + dir.add_argument("-sV", "--server", action="store_true") + + dir.add_argument("-sp", "--show-progress", action="store_true") + + dir.add_argument("-aT", "--application-type", action="store_true") + + dir.add_argument("-wC", "--word-count", action="store_true") + + dir.add_argument("-mc", "--match", nargs="*", type=str) + + dir.add_argument("-ex", "--exclude", type=str, nargs="*") + + + vhost = subparser.add_parser("vhost", add_help=False, usage=argparse.SUPPRESS, exit_on_error=False) + + vhost.add_argument("-vh", "--vhost-help", action="store_true") + + vhost.add_argument("-c", "--concurrency", type=int, default=20) + + vhost.add_argument("-sp", "--show-progress", action="store_true") + + vhost.add_argument("-u", "--url", type=str) + + vhost.add_argument("-nc", "--no-color", action="store_true") + + vhost.add_argument("-w", "--wordlist", type=str) + + vhost.add_argument("-pX", "--proxy", type=str) + + vhost.add_argument("-o", "--output", type=str) + + vhost.add_argument("-v", "--verbose", action="store_true") + + vhost.add_argument("-t", "--title",action="store_true") + + vhost.add_argument("-tO", "--timeout", type=int) + + vhost.add_argument("-sV", "--server", action="store_true") + + vhost.add_argument("-aT", "--application-type", action="store_true") + + vhost.add_argument("-wC", "--word-count", action="store_true") + + vhost.add_argument("-mc", "--match", nargs="*", type=str) + + vhost.add_argument("-ex", "--exclude", type=str, nargs="*") + + dns = subparser.add_parser("dns", add_help=False, usage=argparse.SUPPRESS, exit_on_error=False) + + dns.add_argument("-dnh", "--dns-help", action="store_true") + + dns.add_argument("-d", "--domain", type=str) + + dns.add_argument("-w", "--wordlist", type=str) + + dns.add_argument("-o", "--output", type=str) + + dns.add_argument("-v", "--verbose", action="store_true") + + dns.add_argument("-sp", "--show-progress", action="store_true") + + dns.add_argument("-c", "--concurrency", type=int, default=20) + + doc = subparser.add_parser("doc", add_help=False, usage=argparse.SUPPRESS, exit_on_error=False) + + doc.add_argument("-shd", "--show-doc", action="store_true") + + + + global args + + return parser.parse_args() + + + except argparse.ArgumentError as e: + + print(f"[{bold}{blue}INFO{reset}]: {bold}{white}Please use the command for more infromation:{reset} {bold}{blue}probuster -h{reset} ") + + exit() + + except argparse.ArgumentTypeError as e: + + print(f"[{bold}{blue}INFO{reset}]: {bold}{white}Please use the command for more infromation:{reset} {bold}{blue}probuster -h{reset} ") + + exit() + + + except Exception as e: + + pass + + except KeyboardInterrupt as e: + + print(f"\n[{bold}{blue}INFO{reset}]: {bold}{white}Probuster exits..{reset}") + + exit() + + + + diff --git a/probuster/modules/dir/__init__.py b/probuster/modules/dir/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/probuster/modules/dir/__pycache__/__init__.cpython-311.pyc b/probuster/modules/dir/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000..8f26981 Binary files /dev/null and b/probuster/modules/dir/__pycache__/__init__.cpython-311.pyc differ diff --git a/probuster/modules/dir/__pycache__/__init__.py b/probuster/modules/dir/__pycache__/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/probuster/modules/dir/__pycache__/dir.cpython-311.pyc b/probuster/modules/dir/__pycache__/dir.cpython-311.pyc new file mode 100644 index 0000000..3c86260 Binary files /dev/null and b/probuster/modules/dir/__pycache__/dir.cpython-311.pyc differ diff --git a/probuster/modules/dir/dir.py b/probuster/modules/dir/dir.py new file mode 100644 index 0000000..91bb6c3 --- /dev/null +++ b/probuster/modules/dir/dir.py @@ -0,0 +1,279 @@ +#!/usr/bin/env python3 +import httpx +import os +from colorama import Fore,Back,Style +import concurrent.futures +from concurrent.futures import ThreadPoolExecutor +import requests +from bs4 import BeautifulSoup +import time as t +import warnings +import random +from alive_progress import alive_bar +import sys +from requests.packages.urllib3.exceptions import InsecureRequestWarning +import urllib3 +import asyncio +import aiohttp +import aiofiles + + + +warnings.simplefilter('ignore', requests.packages.urllib3.exceptions.InsecureRequestWarning) + +warnings.filterwarnings("ignore") + +red = Fore.RED + +green = Fore.GREEN + +magenta = Fore.MAGENTA + +cyan = Fore.CYAN + +mixed = Fore.RED + Fore.BLUE + +blue = Fore.BLUE + +yellow = Fore.YELLOW + +white = Fore.WHITE + +reset = Style.RESET_ALL + +bold = Style.BRIGHT + +colors = [ green, cyan, blue] + +random_color = random.choice(colors) + + + +async def save(url, args): + + try: + + + if args.output: + + + + if os.path.isfile(args.output): + + filename = args.output + + elif os.path.isdir(args.output): + + filename = os.path.join(args.output, f"Dir_results.txt") + + else: + + filename = args.output + + + async with aiofiles.open(filename, "a") as w: + + + await w.write(url + '\n') + + except KeyboardInterrupt as e: + + + print(f"\n[{bold}{blue}INFO{reset}]: {bold}{white}Probuster exits..{reset}") + + exit() + + except asyncio.CancelledError as e: + + + print(f"\n[{bold}{blue}INFO{reset}]: {bold}{white}Probuster exits..{reset}\n") + + exit() + + + except Exception as e: + + pass + + + +async def dirbust_req(url, args, session, sem, bar): + + + try: + + async with sem: + + warnings.filterwarnings("ignore", category=ResourceWarning) + + urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) + + requests.packages.urllib3.disable_warnings(InsecureRequestWarning) + + + proxies = { + "http": args.proxy, + "https": args.proxy + } if args.proxy else None + + timeout = args.timeout if args.timeout else 10 + + async with session.get(url, ssl=False, proxy=proxies, timeout=timeout) as response: + + response_text = await response.content.read() + + server1 = response.headers.get("server") + + content_type = response.headers.get("Content-Type") + + if content_type: + + content_type = content_type.split(";")[0].strip() + + + with warnings.catch_warnings(): + + + warnings.filterwarnings("ignore", category=UserWarning, module="bs4") + + soup = BeautifulSoup(response_text, "html.parser") + + text = soup.get_text() + + + word_count = len(text.split()) + + title = soup.title.string + + server = server1 if args.server else "" + + content = content_type if args.application_type else "" + + word = word_count if args.word_count else "" + + title = title if args.title else "" + + status = response.status + + + if args.exclude and str(response.status) in args.exclude: + + pass + + if not args.exclude and not args.match: + + + if args.no_color: + + result = f"{url} [{status}] [{server}] [{content}] [{title}] [{word}]" + + print(f"{result}\n") + + await save(result, args) + + else: + + result = f"{bold}{white}{url} [{bold}{blue}{status}{reset}] [{bold}{magenta}{server}{reset}] [{bold}{yellow}{content}{reset}] [{bold}{cyan}{title}{reset}] [{cyan}{word}{reset}]" + + print(f"{result}\n") + + await save(result, args) + + if args.exclude and not args.match: + + if str(response.status) not in args.exclude: + + if args.no_color: + + result = f"{url} [{response.status}] [{server}] [{content}] [{title}] [{word}]" + + print(f"{result}\n") + + await save(result, args) + + else: + + result = f"{bold}{white}{url} [{bold}{blue}{response.status}{reset}] [{bold}{magenta}{server}{reset}] [{bold}{yellow}{content}{reset}] [{bold}{cyan}{title}{reset}] [{cyan}{word}{reset}]" + + print(f"{result}\n") + + await save(result, args) + + + if args.match and str(response.status) in args.match: + + if args.no_color: + + result = f"{url} [{status}] [{server}] [{content}] [{title}] [{word}] " + + print(f"{result}\n") + + await save(result, args) + + else: + + result = f"{bold}{white}{url} [{bold}{blue}{status}{reset}] [{bold}{magenta}{server}{reset}] [{bold}{yellow}{content}{reset}] [{bold}{cyan}{title}{reset}] [{cyan}{word}{reset}]" + + print(f"{result}\n") + + await save(result, args) + + + bar() + + except KeyboardInterrupt as e: + + print(f"\n[{bold}{blue}INFO{reset}]: {bold}{white}Probuster exits..{reset}\n") + + exit() + + except asyncio.CancelledError as e: + + print(f"\n[{bold}{blue}INFO{reset}]: {bold}{white}Probuster exits..{reset}\n") + + exit() + + except asyncio.TimeoutError: + + + if args.verbose: + + print(f"[{bold}{red}INFO{reset}]: {bold}{white}Client Timeout Exceeds for: {url}{reset}") + + bar() + + + except Exception as e: + + pass + + + + +async def dirbust_threader(hosts, args): + + try: + + + sem = asyncio.Semaphore(args.concurrency) + + async with aiohttp.ClientSession() as session: + + with alive_bar(title="Probuster", total=len(hosts), enrich_print=False) as bar: + + tasks = [dirbust_req(url, args, session, sem, bar) for url in hosts] + + await asyncio.gather(*tasks,return_exceptions=False) + + except KeyboardInterrupt as e: + + print(f"\n[{bold}{blue}INFO{reset}]: {bold}{white}Probuster exits..{reset}") + + exit() + + except Exception as e: + + pass + +warnings.resetwarnings() + diff --git a/probuster/modules/dns/__init__.py b/probuster/modules/dns/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/probuster/modules/dns/__pycache__/__init__.cpython-311.pyc b/probuster/modules/dns/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000..58bfc4e Binary files /dev/null and b/probuster/modules/dns/__pycache__/__init__.cpython-311.pyc differ diff --git a/probuster/modules/dns/__pycache__/__init__.py b/probuster/modules/dns/__pycache__/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/probuster/modules/dns/__pycache__/dns.cpython-311.pyc b/probuster/modules/dns/__pycache__/dns.cpython-311.pyc new file mode 100644 index 0000000..7726dff Binary files /dev/null and b/probuster/modules/dns/__pycache__/dns.cpython-311.pyc differ diff --git a/probuster/modules/dns/dns.py b/probuster/modules/dns/dns.py new file mode 100644 index 0000000..17ea0c9 --- /dev/null +++ b/probuster/modules/dns/dns.py @@ -0,0 +1,188 @@ +import dns.resolver +import time as t +from colorama import Fore, Back, Style +import concurrent.futures +from alive_progress import alive_bar +import os + +red = Fore.RED +green = Fore.GREEN +blue = Fore.BLUE +yellow = Fore.YELLOW +cyan = Fore.CYAN +mixed = Fore.RED + Fore.BLUE +white = Fore.WHITE +reset = Style.RESET_ALL +bold = Style.BRIGHT +colors = [red, green, yellow, cyan, blue] + +subdomains_list = [] + +def get_username(): + + try: + + username = os.getlogin() + + except OSError: + + username = os.getenv('USER') or os.getenv('LOGNAME') or os.getenv('USERNAME') or 'Unknown User' + + except Exception as e: + + username = "Unknown User" + + + return username + +def dns_resolver(subdomain, args): + + + try: + + t.sleep(3) + + searches = dns.resolver.resolve(f"{subdomain}", "A") + + if searches: + + + print(f"[{bold}{green}FOUND{reset}]: {bold}{white}{subdomain}{reset}\n") + + if args.output: + + save_subdomain(subdomain, args) + + else: + + if args.verbose: + + print(f"[{red}InValid{reset}]: {subdomain}") + + except Exception as e: + + if args.verbose: + + print(f"[{red}InValid{reset}]: {subdomain}") + + except KeyboardInterrupt as e: + + print(f"\n[{bold}{blue}INFO{reset}]: {bold}{white}Probuster exits..{reset}") + + exit() + + + +def save_subdomain(subdomain, args): + + + + if os.path.isfile(args.output): + + filename = args.output + + elif os.path.isdir(args.output): + + filename = os.path.join(args.output, f"{args.domain}.subdomains.txt") + + else: + + filename = args.output + + with open(filename, "a") as w: + + w.write(f"{subdomain}\n") + + +def dns_main(args): + + username = get_username() + + if args.wordlist: + + try: + + print(f"""{bold}{white} +======================================================================================== +[!]User : {username} + +[!]Mode : DNS Enumeration + +[!]Doamin : {args.domain} + +[!]Wordlist : {args.wordlist} + +[!]Concurrency : {args.concurrency} + +========================================================================================{reset} + + """) + + with open(args.wordlist, "r") as r: + + read = r.read().splitlines() + + for subdomains in read: + + subdomain = f"{subdomains.strip()}.{args.domain}" + + subdomains_list.append(subdomain) + + dns_thread(subdomains_list, args) + + + + except FileNotFoundError as e: + + print(f"[{red}INFO{reset}]: Wordlist file not found. please check the given {args.wordlist} exists.") + + exit() + + + except Exception as e: + + pass + + elif not args.wordlist: + + print(f"[{bold}{red}INFO{reset}]: {bold}{white}Please provide a wordlist for Dns Enumeration Mode{reset}") + + exit() + + + +def dns_thread(subdomains, args): + + try: + + + if args.show_progress: + + with alive_bar(len(subdomains), enrich_print=False) as bar: + + with concurrent.futures.ThreadPoolExecutor(max_workers=args.concurrency) as executor: + + futures = {executor.submit(dns_resolver, subdomain, args)for subdomain in subdomains} + + for futures in concurrent.futures.as_completed(futures): + + bar() + + else: + + with concurrent.futures.ThreadPoolExecutor(max_workers=args.concurrency) as executor: + + futures = {executor.submit(dns_resolver, subdomain, args)for subdomain in subdomains} + + concurrent.futures.wait(futures) + + except Exception as e: + + pass + + + except KeyboardInterrupt as e: + + print(f"\n[{bold}{blue}INFO{reset}]: {bold}{white}Probuster exits..{reset}") + + exit() \ No newline at end of file diff --git a/probuster/modules/handler.py b/probuster/modules/handler.py new file mode 100644 index 0000000..2c4f050 --- /dev/null +++ b/probuster/modules/handler.py @@ -0,0 +1,345 @@ +#!/usr/bin/env python3 +from colorama import Fore,Style +import argparse +from bs4 import BeautifulSoup +import time as t +import warnings +import random +import sys +import requests +import asyncio + + + + +warnings.simplefilter('ignore', requests.packages.urllib3.exceptions.InsecureRequestWarning) + +warnings.filterwarnings("ignore") + +red = Fore.RED + +green = Fore.GREEN + +magenta = Fore.MAGENTA + +cyan = Fore.CYAN + +mixed = Fore.RED + Fore.BLUE + +blue = Fore.BLUE + +yellow = Fore.YELLOW + +white = Fore.WHITE + +reset = Style.RESET_ALL + +bold = Style.BRIGHT + +colors = [ green, cyan, blue] + +random_color = random.choice(colors) + + + +try: + + from .cli.cli import cli + from .banner.banner import banner + from .help.help import * + from .version.version import * + from .wordlist.wordlist import * + from .dir.dir import * + from .dns.dns import * + from .vhost.vhost import * + +except ImportError as e: + + print(f"[{bold}{red}INFO{reset}]: {bold}{white}Import Error occured in Module imports due to: {e}{reset}") + + print(f"[{bold}{blue}INFO{reset}]: {bold}{white}If you are encountering this issue more than a time please report the issues in Probuster Github page.. {reset}") + + exit() + +def doc_file(): + + global file_path + + filename = "probuster_documentation.py" + + path = "/" + + for root,dirs,files in os.walk(path): + + if filename in files: + + file_path = os.path.join(root, filename) + + return file_path + + print(f"[{bold}{red}ALERT{reset}]: Config File not found please kindly install the Probuster with its {filename} file") + +def get_username(): + + try: + + username = os.getlogin() + + except OSError: + + username = os.getenv('USER') or os.getenv('LOGNAME') or os.getenv('USERNAME') or 'Unknown User' + + except Exception as e: + + username = "Unknown User" + + + return username + +def version(): + + latest = check_version() + + version = "v1.0.1" + + if latest == version: + + print(f"[{blue}{bold}Version{reset}]:{bold}{white} Probuster current version {version} ({green}latest{reset}{bold}{white}){reset}") + + else: + + print(f"[{blue}{bold}Version{reset}]: {bold}{white}Probuster current version {version} ({red}outdated{reset}{bold}{white}){reset}") + +def vhost_manager(): + + + try: + global username + + username = get_username() + + if not args.wordlist: + + print(f"[{bold}{red}INFO{reset}]: {bold}{white}Please provide a wordlist for Virtual enumeration mode{reset}") + exit() + + + + print(f"""{bold}{white} + +======================================================================================== +[!]User : {username} + +[!]Mode : Virtual Host Enumeration + +[!]URL : {args.url} + +[!]Wordlist : {args.wordlist} + +[!]Concurrency : {args.concurrency} + +[!]Time-Out : {args.timeout} + +========================================================================================{reset} +""") + + hosts = common_loader(args.wordlist) + + if len(hosts) > 0: + + vhost_threader(hosts, args.url, args) + + else: + + print(f"[{bold}{red}INFO{reset}]: {bold}{white}Please provide a good wordlists for Virtual Hosts Enumeration{reset}") + + exit() + + + + except KeyboardInterrupt as e: + + print(f"\n[{bold}{blue}INFO{reset}]: {bold}{white}Probuster exits..{reset}") + + exit() + + except Exception as e: + + pass + + +def dirbuster_manager(url): + + username = get_username() + + if not args.wordlist: + + print(f"[{bold}{red}INFO{reset}]: {bold}{white}Please provide a wordlist for Directory or File enumeration mode{reset}") + + exit() + + + print(f"""{bold}{white} + +======================================================================================== +[!]User : {username} + +[!]Mode : Directory or File Enumeration + +[!]URL : {args.url} + +[!]Wordlist : {args.wordlist} + +[!]Concurrency : {args.concurrency} + +[!]Time-Out : {args.timeout} + +========================================================================================{reset} +""") + + hosts = common_loader(args.wordlist) + + + + dirb = [] + + for host in hosts: + + dirb.append(f"{url}{host}") + + + asyncio.run(dirbust_threader(dirb,args)) + + + +def dns_manager(): + + + dns_main(args) + + + + +def handler(): + + banners = banner() + + print(f"{bold}{random_color}{banners}{reset}") + + version() + + global args + + args = cli() + + help() + + if args.mode == "vhost": + + if args.url: + + vhost_manager() + + elif not args.url: + + print(f"[{bold}{red}INFO{reset}]: {bold}{white}Please provide -u or --url value for Virutal Host enumeration{reset}\n") + + vhost_mode_help() + + exit() + + if args.mode == "dns" : + + if args.domain: + + dns_manager() + + elif not args.domain: + + print(f"[{bold}{red}INFO{reset}]: {bold}{white}Please provide -d or --domain value for DNS enumeration{reset}") + + dns_mode_help() + + exit() + + if args.mode == "dir" : + + if args.url: + + if args.url.startswith(("https://", "http://")): + + url = args.url if args.url.endswith("/") else f"{args.url}/" + + elif args.url.startswith(("https://", "http://")): + + url = f"http://{args.url}" if args.url.endswith("/") else f"https://{args.url}/" + else: + + print(f"[{bold}{red}INFO{reset}]: {bold}{white}Please provide a --url or -u value with https:// or http:// protocol{reset}") + + exit() + + dirbuster_manager(url) + + if not args.url: + + print(f"[{bold}{red}INFO{reset}]: {bold}{white}Please provide -u or --url value for Directory or File enumeration{reset}") + + dir_mode_help() + + exit() + + if args.mode == "doc" : + + file_path = doc_file() + + username = get_username() + + if args.show_doc: + + t.sleep(1) + + print(f"[{bold}{green}INFO{reset}]: {bold}{white}Loading your documentation please wait....{reset}") + + t.sleep(5) + + print(f"[{bold}{green}INFO{reset}]: {bold}{white}Loaded your documentation, thank you for your patience {username} {reset}") + + t.sleep(2) + + os.system(f"streamlit run {file_path}") + + else: + t.sleep(1) + print(f"[{bold}{green}INFO{reset}]: {bold}{white}Loading your documentation please wait....{reset}") + + t.sleep(5) + + print(f"[{bold}{green}INFO{reset}]: {bold}{white}Loaded your documentation, thank you for your patience {username} {reset}") + + t.sleep(2) + + os.system(f"streamlit run {file_path}") + + + + +def help(): + + if args.help and not args.mode: + + mode_help() + + elif args.mode == "vhost" and args.vhost_help: + + vhost_mode_help() + + elif args.mode == "dir" and args.dir_help: + + dir_mode_help() + + elif args.mode == "dns" and args.dns_help: + + dns_mode_help() + + diff --git a/probuster/modules/help/__init__.py b/probuster/modules/help/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/probuster/modules/help/__pycache__/__init__.cpython-311.pyc b/probuster/modules/help/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000..cb83593 Binary files /dev/null and b/probuster/modules/help/__pycache__/__init__.cpython-311.pyc differ diff --git a/probuster/modules/help/__pycache__/__init__.py b/probuster/modules/help/__pycache__/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/probuster/modules/help/__pycache__/help.cpython-311.pyc b/probuster/modules/help/__pycache__/help.cpython-311.pyc new file mode 100644 index 0000000..7a8eb1c Binary files /dev/null and b/probuster/modules/help/__pycache__/help.cpython-311.pyc differ diff --git a/probuster/modules/help/help.py b/probuster/modules/help/help.py new file mode 100644 index 0000000..5323ee5 --- /dev/null +++ b/probuster/modules/help/help.py @@ -0,0 +1,188 @@ +from colorama import Fore,Back,Style + + +red = Fore.RED + +green = Fore.GREEN + +magenta = Fore.MAGENTA + +cyan = Fore.CYAN + +mixed = Fore.RED + Fore.BLUE + +blue = Fore.BLUE + +yellow = Fore.YELLOW + +white = Fore.WHITE + +reset = Style.RESET_ALL + +bold = Style.BRIGHT + +colors = [ green, cyan, blue] + + + +def mode_help(): + + print(f""" +[{bold}{blue}DESCRIPTION{reset}]: {bold}{white}A Python based Web Application Penetration testing tool for Information Gathering{reset}⚡. + +[{bold}{blue}MODES{reset}]: {bold}{white} + + + - dir : Directory/file enumeration mode + - vhost : Virtual host enumeration mode + - dns : DNS enumeration mode + - doc : Documentation mode for detailed documentation about Probuster + +[{bold}{blue}Usage{reset}]: {bold}{white} + + probuster [commands] + + Available Commands: + + - dir : Execute directory/file enumeration mode. + - vhost : Execute virtual host enumeration mode. + - dns : Execute DNS enumeration mode. + - doc : Access detailed documentation for Probuster. + + Help Commands: + + - dir : probuster dir -dh + - vhost : probuster vhost -vh + - dns : probuster dns -dnh + - doc : probuster doc -shd + + Notes: + + - For each mode, additional options and flags are available. Use 'probuster [mode] -h' for mode-specific help. + + - Ensure you have the latest version of Probuster for optimal performance and access to the latest features. + + - Ensure with your concurrency value for good results. Probuster performance depends on the User system resources. + + For detailed information about each mode and usage examples, use 'probuster doc --show-doc' or probuster doc -shd. + \n {reset}""") + + + exit() + +def dir_mode_help(): + + print(f""" +[{bold}{blue}MODE{reset}]: {bold}{white}Directory and Files Enumerations{reset} + +[{bold}{blue}Usage{reset}]: {bold}{white} + + probuster dir [options] + + Options for dir mode: + + -u, --url : Specify the target domain or ip for Directory/File Enumeration mode + -dh, --dir-help : Show the help message for Directory Enumeration mode + -c, --concurrency : Set Concurrency level for multiple process for Directory or File enumeration (default: 20) + -w, --wordlist : Wordlist or hostname for Directory or File enumeration + -pX. --proxy : Set proxy to pass your request through proxy (ex: 127.0.0.1) + -o, --output : Give a file to save the output for Directory or File enumeration + -v, --verbose : Set Verbose to show output (errors)! + -t, --title : Get title of the found Directory or File + -tO, --timeout : Set timeout for each request (default 10) + -sV. --server : Get the server name of the found Directory or File + -aT, --application-type : Get the application type of the found Directory or File + -wC, --word-count : Get the word count of the found Directory or File + -nc, --no-color : Disables the colorization output for found results + -sp. --show-progress : Enable show prgress mode which will show the progress of the Subprober with progress bar like this ( example: |████████████████████████████████████████| 4000/4000 [100%] in 12.4s (3.23/s) ). + -mc, --match : Matches the status code given by user for example: -mc 200 302 + -ex, --excluded : Excludes the negative codes and gives user desired results for example: -ex 400 404 500 + + Notes: + + - Probuster Concurrency on Dir/file Enumerations depends on your system resources + + - Be careful and gentle with you concurrency value + + - Enable desired output flag options for found directories/files + """) + + exit() + + + +def vhost_mode_help(): + + print(f""" +[{bold}{blue}MODE{reset}]: {bold}{white}Virtual Host Enumerations{reset} + +[{bold}{blue}Usage{reset}]: {bold}{white} + + probuster vhost [options] + + Options for vhost mode: + + -u, --url : Specify the target ip or host for vitrual host enumeration ( Most probably use IP address as the URL argument) + -vh, --vhost-help : Show the help message for Vhost Enumeration mode + -c, --concurrency : Set Concurrency level for multiple process for virtual host enumeration (default: 20) + -w, --wordlist : Wordlist or hostname for brutforce and find virtual host + -pX. --proxy : Set proxy to pass your request through proxy (ex: 127.0.0.1) + -o, --output : Give a file to save the output of virtual host enumeration + -v, --verbose : Set Verbose to show output (errors)! + -t, --title : Get title of the found virtual host + -tO, --timeout : Set timeout for each request (default 10) + -sV. --server : Get the server name of the found virtual host + -aT, --application-type : Get the application type of the found virtual host + -wC, --word-count : Get the word count of the found virtual host + -nc, --no-color : Disables the colorization output for found results + -sp. --show-progress : Enable show prgress mode which will show the progress of the Subprober with progress bar like this ( example: |████████████████████████████████████████| 4000/4000 [100%] in 12.4s (3.23/s) ). + -mc, --match : Matches the status code given by user for example: -mc 200 302 + -ex, --excluded : Excludes the negative codes and gives user desired results for example: -ex 400 404 500 + + + Notes: + + - Virtual host enumeration plays a vital role in expanding your attack vectors + + - Virtual host are hiddent host that you may not able to find through some alive subdomains + + - Probuster Vhost simplifies the Virtual host enumeration which explained here: https://shorturl.at/berBU + + - Probuster will bring new feature for virtual host brutforcing mode in upcoming updates + + + """) + + exit() + + +def dns_mode_help(): + + print(f""" +[{bold}{blue}MODE{reset}]: {bold}{white}DNS Enumerations{reset} + +[{bold}{blue}Usage{reset}]: {bold}{white} + + probuster dns [options] + + Options for dns mode: + + -d, --domain : Domain name for Dns Brutforcing and find subdomains + -dnh, --dns-help : Show the help message for DNS Enumeration mode + -w, --wordlist : Wordlist for brutforcing subdomains + -c, --concurrency : Set Concurrency level for multiple process for DNS enumeration (default: 20) + -v, --verbose : Set Verbose to show output (errors)! + -o, --output : Give a file to save the output of DNS enumeration + -sp. --show-progress : Enable show prgress mode which will show the progress of the Subprober with progress bar like this ( example: |████████████████████████████████████████| 4000/4000 [100%] in 12.4s (3.23/s) ). + + Notes: + + - Be Gentle with your concurrency value for Dns Enumeration + + - If your system is capable to handle high loads with high threads then you can use 1m+ wordlists + + - Enable you progress bar to know about the your dns enumeration process + """) + + exit() + diff --git a/probuster/modules/probuster_documentation.py b/probuster/modules/probuster_documentation.py new file mode 100644 index 0000000..d4b92ef --- /dev/null +++ b/probuster/modules/probuster_documentation.py @@ -0,0 +1,436 @@ +import streamlit as st +import os + + +def get_username(): + + try: + + username = os.getlogin() + + except OSError: + + username = os.getenv('USER') or os.getenv('LOGNAME') or os.getenv('USERNAME') or 'Unknown User' + + except Exception as e: + + username = "Unknown User" + + + return username + +username = get_username() + + + + +st.markdown(f"\n### Welcome to Probuster Documentation {username.upper()} :heart:\n") +st.markdown(f"""--- + +#### Probuster: A Python based Web Application Penetration Tool for Information Gathering :zap:""") +st.markdown(f""" + + +Probuster is a cutting-edge reconnaissance toolkit meticulously crafted for ethical hackers, penetration testers, bug bounty hunters and security professionals seeking unparalleled precision in the art of information gathering. This versatile tool seamlessly integrates four distinctive modes, empowering users with unprecedented insights into network landscapes. + +**DNS Mode: Unleash the Power of Threaded DNS Enumeration** + +In DNS mode, Probuster employs state-of-the-art threaded techniques to perform rapid and comprehensive DNS enumeration. Uncover hidden subdomains, identify potential vulnerabilities, and map the intricate web of domain structures with unparalleled efficiency. Probuster's DNS mode is designed for speed, accuracy, and reliability, ensuring a thorough examination of your target's digital footprint. + +**Dir Mode: Elevate Directory and File Enumeration to New Heights** + +Probuster's Dir mode elevates directory and file enumeration to new heights. Effortlessly scan web applications for hidden gems, vulnerable endpoints, and critical files. With Probuster's intelligent algorithms and intuitive interface, identify potential security loopholes and streamline your penetration testing workflow with unparalleled ease. + +**VHost Mode: Illuminate Virtual Host Structures with Precision** + +Illuminate the virtual host landscape using Probuster's VHost mode. Uncover obscured hosts, validate configurations, and gain a granular understanding of the web infrastructure. Probuster's VHost mode delivers accurate virtual host enumeration, enabling security professionals to assess attack surfaces comprehensively and make informed decisions. + +**Docs Mode: Explore Comprehensive Documentation with Ease** + +Probuster's Docs mode provides a seamlessly integrated documentation hub. Explore comprehensive guides, usage examples, and detailed explanations of each mode. Whether you're a seasoned professional or a beginner, Probuster's documentation ensures that you can harness the full power of the toolkit with confidence. + +**Key Features:** + +- **Threaded Efficiency:** Probuster harnesses the power of multithreading for rapid and parallelized reconnaissance, ensuring swift and effective scans. + +- **User-Friendly Interface:** A sleek and intuitive interface facilitates seamless navigation, making Probuster a tool of choice for both novice and seasoned cybersecurity professionals. + +- **Customizable Settings:** Tailor Probuster to your specific needs with customizable settings, allowing fine-tuning for different environments and scenarios. + +- **Comprehensive Reporting:** Generate detailed reports that encapsulate findings, aiding in concise communication of discovered vulnerabilities and potential risks. + +Probuster is not just a tool, it's a manifestation of excellence in reconnaissance, designed to empower ethical hackers with the precision needed to navigate the complexities of modern cybersecurity landscapes. Elevate your penetration testing capabilities with Probuster and redefine your approach to ethical hacking. + +### New Update: + +**Improved Concurrency:** Probuster is now improved more powerfull in concurrency and this particular improvement made in Directory/File Enumeration Mode which probuster now can run efficiently run in low end system with high concurrency and also improved resulting accuracy. + + +--- +""") + +st.markdown(f""" + +### Main Usage: +```yaml +probuster --help + + ____ ____ __ + / __ \ _____ ____ / __ ) __ __ _____ / /_ ___ _____ + / /_/ / / ___/ / __ \ / __ | / / / / / ___/ / __/ / _ \ / ___/ + / ____/ / / / /_/ / / /_/ / / /_/ / (__ ) / /_ / __/ / / +/_/ /_/ \____/ /_____/ \__,_/ /____/ \__/ \___/ /_/ + + + +Probuster - A Python-based Web Application Penetration Testing Tool for Information Gathering. + +[Version]: Probuster current version v1.0.0 (latest) + + +[DESCRIPTION]: A Python based Web Application Penetration Tool for Information Gathering ⚡ + +[MODES]: + + - dir : Directory/file enumeration mode + - vhost : Virtual host enumeration mode + - dns : DNS enumeration mode + - doc : Documentation mode for detailed documentation about Probuster + +[Usage]: + + probuster [command] + +Available Commands: + + - dir : Execute directory/file enumeration mode. + - vhost : Execute virtual host enumeration mode. + - dns : Execute DNS enumeration mode. + - doc : Access detailed documentation for Probuster. + +Help Commands: + + - dir : probuster dir -dh + - vhost : probuster vhost -vh + - dns : probuster dns -dnh + - doc : probuster doc -shd + +Notes: + + - For each mode, additional options and flags are available. Use 'probuster [mode] -h' for mode-specific help. + + - Ensure you have the latest version of Probuster for optimal performance and access to the latest features. + + - Ensure with your concurrency value for good results. Probuster performance depends on the User system resources. + +For detailed information about each mode and usage examples, use 'probuster doc --show-doc'. + +``` +Probuster's main usage help serves as a gateway to its robust features. Use the command structure `probuster [commands]` to access specialized modes like `dir` for directory enumeration, `vhost` for virtual host analysis, and `dns` for threaded DNS enumeration. Additionally, explore detailed documentation effortlessly with the `doc` mode. Tailor your commands, leverage advanced features, and elevate your web application penetration testing with Probuster. +Lets see some more information about all probuster modes and their usages for more detailed explaination see in below. + +""") + +st.markdown(f""" +--- +### Probuster dir Mode Usage: + +```yaml +probuster dir -dh + + ___ ___ _ +| _ \ _ _ ___ | _ ) _ _ ___| |_ ___ _ _ +| _/| '_|/ _ \| _ \| || |(_-<| _|/ -_)| '_| +|_| |_| \___/|___/ \_,_|/__/ \__|\___||_| + + +[Version]: Probuster current version v1.0.0 (latest) + +[MODE] : Directory and Files Enumerations + +[Usage] : probuster dir [options] + + +Options for dir mode: + + -u, --url : Specify the target domain or ip for Directory/File Enumeration mode + -dh, --dir-help : Show the help message for Directory Enumeration mode + -c, --concurrency : Set Concurrency level for multiple process for Directory or File enumeration (default: 20) + -w, --wordlist : Wordlist or hostname for Directory or File enumeration + -pX. --proxy : Set proxy to pass your request through proxy (ex: 127.0.0.1) + -o, --output : Give a file to save the output for Directory or File enumeration + -v, --verbose : Set Verbose to show output (errors)! + -t, --title : Get title of the found Directory or File + -tO, --timeout : Set timeout for each request (default 10) + -sV. --server : Get the server name of the found Directory or File + -aT, --application-type : Get the application type of the found Directory or File + -wC, --word-count : Get the word count of the found Directory or File + -nc, --no-color : Disables the colorization output for found results + -sp. --show-progress : Enable show prgress mode which will show the progress of the Subprober with progress bar like this ( example: |████████████████████████████████████████| 4000/4000 [100%] in 12.4s (3.23/s) ). + -mc, --match : Matches the status code given by user for example: -mc 200 302 + -ex, --excluded : Excludes the negative codes and gives user desired results for example: -ex 400 404 500 + +Notes: + + - Probuster Concurrency on Dir/file Enumerations depends on your system resources + + - Be careful and gentle with you concurrency value + + - Enable desired output flag options for found directories/files + +``` + +### Dir Mode Examples: + + +```yaml +probuster dir -u http://test.com -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -o dirfile.txt -c 500 -ex 404 -sp --title --server --application-type -wC + + + ___ ___ _ +| _ \ _ _ ___ | _ ) _ _ ___| |_ ___ _ _ +| _/| '_|/ _ \| _ \| || |(_-<| _|/ -_)| '_| +|_| |_| \___/|___/ \_,_|/__/ \__|\___||_| + + +[Version]: Probuster current version v1.0.0 (latest) + + +======================================================================================== +[!]User : {username} + +[!]Mode : Directory or File Enumeration + +[!]URL : http://test.com + +[!]Wordlist : /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt + +[!]Concurrency : 500 + +[!]Time-Out : None + +======================================================================================== + +http://test.com/images [403] [Apache] [text/html] [403:Forbidden] [165] +http://test.com/js [403] [Apache] [text/html] [403:Forbidden] [165] +http://test.com/documentation [403] [Apache] [text/html] [403:Forbidden] [165] +http://test.com/dashboard [200] [Apache] [text/html] [Admin Dashboard] [2080] +http://test.com/javascript [403][Apache] [text/html] [403:Forbidden] [165] +http://test.com/javascript [403] [Apache] [text/html] [403:Forbidden] [165] + +|██████████████████████████████████ | 3598/4000 [80%] in 12.4s (3.23/s) +``` +--- +""") + +st.markdown(f""" + +### Probuster dns Mode Usage: + +```yaml +probuster dns -dnh + + + ___ ___ _ + / _ \ _ __ ___ / __\ _ _ ___ | |_ ___ _ __ + / /_)/| '__| / _ \ /__\//| | | |/ __|| __| / _ \| '__| +/ ___/ | | | (_) |/ \/ \| |_| |\__ \| |_ | __/| | +\/ |_| \___/ \_____/ \__,_||___/ \__| \___||_| + + + +[Version]: Probuster current version v1.0.0 (latest) + +[MODE] : DNS Enumerations + +[Usage] : probuster dns [options] + +[MODE]: DNS Enumerations + +[Usage]: + + probuster dns [options] + + Options for dns mode: + + -d, --domain : Domain name for Dns Brutforcing and find subdomains + -dnh, --dns-help : Show the help message for DNS Enumeration mode + -w, --wordlist : Wordlist for brutforcing subdomains + -c, --concurrency : Set Concurrency level for multiple process for DNS enumeration (default: 20) + -v, --verbose : Set Verbose to show output (errors)! + -o, --output : Give a file to save the output of DNS enumeration + -sp. --show-progress : Enable show prgress mode which will show the progress of the Subprober with progress bar like this ( example: |████████████████████████████████████████| 4000/4000 [100%] in 12.4s (3.23/s) ). + + Notes: + + - Be Gentle with your concurrency value for Dns Enumeration + + - If your system is capable to handle high loads with high threads then you can use 1m+ wordlists + + - Enable you progress bar to know about the your dns enumeration process +``` +---""") + +st.markdown(f""" +### Dns Mode Examples: + +```yaml + +probuster dns -d microsoft.com -c 20 -o test.txt -w ~/wordlists/subdomains/subdomains1.txt -sp + + + ___ ___ _ + / _ \ _ __ ___ / __\ _ _ ___ | |_ ___ _ __ + / /_)/| '__| / _ \ /__\//| | | |/ __|| __| / _ \| '__| +/ ___/ | | | (_) |/ \/ \| |_| |\__ \| |_ | __/| | +\/ |_| \___/ \_____/ \__,_||___/ \__| \___||_| + + + +[Version]: Probuster current version v1.0.0 (latest) +======================================================================================== +[!]User : {username} + +[!]Mode : DNS Enumeration + +[!]Doamin : microsoft.com + +[!]Wordlist : /home/user/wordlists/subdomains/subdomains.txt + +[!]Concurrency : 20 + +======================================================================================== + + +[FOUND]: www.microsoft.com +[FOUND]: s.microsoft.com +[FOUND]: i.microsoft.com +[FOUND]: connect.microsoft.com +[FOUND]: connect.microsoft.com +[FOUND]: assets.microsoft.com +[FOUND]: maps.microsoft.com +[FOUND]: cdn.microsoft.com +[FOUND]: api.microsoft.com +|███ | 3998/400000 [20%] in 12.4s (3.23/s) +``` +---""") + +st.markdown(f""" +### Probuster Vhost Mode Usage: + +```yaml +probuster vhost -vh + + , __ , __ +/|/ \ /|/ \ + |___/ ,_ __ | __/ , _|_ _ ,_ + | / | / \_ | \| | / \_ | |/ / | + | |_/\__/ |(__/ \_/|_/ \/ |_/|__/ |_/ + + + +[Version]: Probuster current version v1.0.0 (latest) + +[MODE]: Virtual Host Enumerations + +[Usage]: + + probuster vhost [options] + + Options for vhost mode: + + -u, --url : Specify the target ip or host for vitrual host enumeration ( Most probably use IP address as the URL argument) + -vh, --vhost-help : Show the help message for Vhost Enumeration mode + -c, --concurrency : Set Concurrency level for multiple process for virtual host enumeration (default: 20) + -w, --wordlist : Wordlist or hostname for brutforce and find virtual host + -pX. --proxy : Set proxy to pass your request through proxy (ex: 127.0.0.1) + -o, --output : Give a file to save the output of virtual host enumeration + -v, --verbose : Set Verbose to show output (errors)! + -t, --title : Get title of the found virtual host + -tO, --timeout : Set timeout for each request (default 10) + -sV. --server : Get the server name of the found virtual host + -aT, --application-type : Get the application type of the found virtual host + -wC, --word-count : Get the word count of the found virtual host + -nc, --no-color : Disables the colorization output for found results + -sp. --show-progress : Enable show prgress mode which will show the progress of the Subprober with progress bar like this ( example: |████████████████████████████████████████| 4000/4000 [100%] in 12.4s (3.23/s) ). + -mc, --match : Matches the status code given by user for example: -mc 200 302 + -ex, --excluded : Excludes the negative codes and gives user desired results for example: -ex 400 404 500 + + Notes: + + - Virtual host enumeration plays a vital role in expanding your attack vectors + + - Virtual host are hiddent host that you may not able to find through some alive subdomains + + - Probuster Vhost simplifies the Virtual host enumeration which explained here: https://shorturl.at/berBU + + - Probuster will bring new feature for virtual host brutforcing mode in upcoming updates + + +``` +---""") + +st.markdown(f""" +### Vhost Mode Examples: + +```yaml +probuster vhost -u https://20.236.44.162 -tO 5 -c 100 -sp -w ~/Desktop/Bugbounty/public/microsoft/all_subdomains.txt --server --title -aT -wC --output output.txt + + , __ , __ +/|/ \ /|/ \ + |___/ ,_ __ | __/ , _|_ _ ,_ + | / | / \_ | \| | / \_ | |/ / | + | |_/\__/ |(__/ \_/|_/ \/ |_/|__/ |_/ + + + +[Version]: Probuster current version v1.0.0 (latest) + +======================================================================================== +[!]User : {username} + +[!]Mode : Virtual Host Enumeration + +[!]URL : https://20.236.44.162 + +[!]Wordlist : /home/user/Desktop/Bugbounty/public/microsoft/all_subdomains.txt + +[!]Concurrency : 100 + +[!]Time-Out : 5 + +======================================================================================== + +academic.microsoft.com [400] [AkamaiGHost] [text/html] [Invalid URL] [13] +Academic.microsoft.com [400] [AkamaiGHost] [text/html] [Invalid URL] [13] +Academy.microsoft.com [400] [AkamaiGHost] [text/html] [Invalid URL] [13] +academy.techcommunity.microsoft.com [400] [AkamaiGHost] [text/html] [Invalid URL] [13] +academy.microsoft.com [400] [AkamaiGHost] [text/html] [Invalid URL] [13] +academy.microsoft.com [400] [AkamaiGHost] [text/html] [Invalid URL] [13] +|█████▌ | 12611/91392 [14%] in 8:27.5 (24.85/s) + +``` +---""") + +st.markdown(f""" + +## Probuster GitHub Repository + +Head over to the [Probuster GitHub repository](https://github.com/sanjai-AK47/Probuster). Dive into the code, contribute your expertise, and share your experiences and feedback. This tool is a collaborative effort, +## About the Author + +I'm D. Sanjai Kumar, the creator of Probuster. I'm passionate about advancing cybersecurity, and Probuster is a testament to that passion. Connect with me on [LinkedIn](https://www.linkedin.com/in/d-sanjai-kumar-109a7227b). + +## Show Your Support + +If Probuster has rocked your ethical hacking world, let's spread the love! Give the repository a star :star: on [GitHub](https://github.com/sanjai-AK47/Probuster). Share it with your network, and let's build a community around this tool. + +Got feedback, suggestions, or want to contribute? Reach out to me directly. Let's keep pushing the boundaries of cybersecurity and innovation together. + +Thank you for choosing Probuster. Now, go out there and hack responsibly! + +--- +**Disclaimer:** +Probuster is designed for ethical hacking and penetration testing. Any use for malicious activities is strictly prohibited. +""") +st.markdown(f"---") \ No newline at end of file diff --git a/probuster/modules/version/__init__.py b/probuster/modules/version/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/probuster/modules/version/__pycache__/__init__.cpython-311.pyc b/probuster/modules/version/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000..4a67e72 Binary files /dev/null and b/probuster/modules/version/__pycache__/__init__.cpython-311.pyc differ diff --git a/probuster/modules/version/__pycache__/__init__.py b/probuster/modules/version/__pycache__/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/probuster/modules/version/__pycache__/version.cpython-311.pyc b/probuster/modules/version/__pycache__/version.cpython-311.pyc new file mode 100644 index 0000000..200e678 Binary files /dev/null and b/probuster/modules/version/__pycache__/version.cpython-311.pyc differ diff --git a/probuster/modules/version/version.py b/probuster/modules/version/version.py new file mode 100644 index 0000000..5bcc225 --- /dev/null +++ b/probuster/modules/version/version.py @@ -0,0 +1,65 @@ +#!/usr/bin/env python3 +import random +import os +from colorama import Fore,Back,Style +import requests +import urllib3 + +urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) + +requests.packages.urllib3.disable_warnings() + +red = Fore.RED + +green = Fore.GREEN + +magenta = Fore.MAGENTA + +cyan = Fore.CYAN + +mixed = Fore.RED + Fore.BLUE + +blue = Fore.BLUE + +yellow = Fore.YELLOW + +white = Fore.WHITE + +reset = Style.RESET_ALL + +bold = Style.BRIGHT + +colors = [ green, cyan, blue] + +random_color = random.choice(colors) + +def check_version(): + + + url = f"https://api.github.com/repos/sanjai-AK47/Probuster/releases/latest" + + try: + + + response = requests.get(url, verify=True, timeout=10) + + if response.status_code == 200: + + data = response.json() + + latest = data.get('tag_name') + + return latest + + + + except KeyboardInterrupt as e: + + print(f"[{bold}{blue}INFO{reset}]: {bold}{white}Probuster exits..{reset}") + + exit() + + + except Exception as e: + + pass \ No newline at end of file diff --git a/probuster/modules/vhost/__init__.py b/probuster/modules/vhost/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/probuster/modules/vhost/__pycache__/__init__.cpython-311.pyc b/probuster/modules/vhost/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000..672e3dc Binary files /dev/null and b/probuster/modules/vhost/__pycache__/__init__.cpython-311.pyc differ diff --git a/probuster/modules/vhost/__pycache__/__init__.py b/probuster/modules/vhost/__pycache__/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/probuster/modules/vhost/__pycache__/vhost.cpython-311.pyc b/probuster/modules/vhost/__pycache__/vhost.cpython-311.pyc new file mode 100644 index 0000000..6fa06a5 Binary files /dev/null and b/probuster/modules/vhost/__pycache__/vhost.cpython-311.pyc differ diff --git a/probuster/modules/vhost/vhost.py b/probuster/modules/vhost/vhost.py new file mode 100644 index 0000000..fcf4ae5 --- /dev/null +++ b/probuster/modules/vhost/vhost.py @@ -0,0 +1,268 @@ +#!/usr/bin/env python3 +import httpx +import os +from colorama import Fore,Back,Style +import argparse +import concurrent.futures +import requests +from bs4 import BeautifulSoup +import time as t +import warnings +import random +from alive_progress import alive_bar +import sys +from requests.packages.urllib3.exceptions import InsecureRequestWarning +import urllib3 + +warnings.filterwarnings("ignore") + +red = Fore.RED + +green = Fore.GREEN + +magenta = Fore.MAGENTA + +cyan = Fore.CYAN + +mixed = Fore.RED + Fore.BLUE + +blue = Fore.BLUE + +yellow = Fore.YELLOW + +white = Fore.WHITE + +reset = Style.RESET_ALL + +bold = Style.BRIGHT + +colors = [ green, cyan, blue] + +random_color = random.choice(colors) + + +def save(url, args): + + try: + + + + if os.path.isfile(args.output): + + filename = args.output + + elif os.path.isdir(args.output): + + filename = os.path.join(args.output, f"vhost_results.txt") + + else: + + filename = args.output + + + with open(filename, "a") as w: + + w.write(url + '\n') + + except KeyboardInterrupt as e: + + print(f"\n[{bold}{blue}INFO{reset}]: {bold}{white}Probuster exits..{reset}") + + exit() + + except Exception as e: + + pass + + +def vhost_req(host, url, args): + + try: + + warnings.filterwarnings("ignore", category=ResourceWarning) + + warnings.filterwarnings("ignore", category=ResourceWarning) + + urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) + + requests.packages.urllib3.disable_warnings() + + requests.packages.urllib3.disable_warnings(InsecureRequestWarning) + + proxies = { + + "http": f"{args.proxy}", + "https": f"{args.proxy}" + } if args.proxy else False + + headers={"Host": f"{host}"} + + timeout= args.timeout if args.timeout else 10 + + response = requests.get(url, verify=False, timeout=timeout, proxies=proxies, headers=headers) + + t.sleep(1) + + server1 = response.headers.get("server") + + vhost = response.request.headers.get("Host") + + content_type = response.headers.get("Content-Type") + + if content_type: + + content_type = content_type.split(";")[0].strip() + + + with warnings.catch_warnings(): + + + warnings.filterwarnings("ignore", category=UserWarning, module="bs4") + + soup = BeautifulSoup(response.content, "html.parser") + + text = soup.get_text() + + + word_count = len(text.split()) + + title = soup.title.string + + server = server1 if args.server else "" + + content = content_type if args.application_type else "" + + word = word_count if args.word_count else "" + + title = title if args.title else "" + + if not args.exclude and not args.match: + + if args.no_color: + + result = f"{vhost} [{response.status_code}] [{server}] [{content}] [{title}] [{word}]" + + else: + + result = f"{bold}{white}{vhost} [{bold}{blue}{response.status_code}{reset}] [{bold}{magenta}{server}{reset}] [{bold}{yellow}{content}{reset}] [{bold}{cyan}{title}{reset}] [{cyan}{word}{reset}]" + + + if args.match : + + if str(response.status_code) in args.match: + + if args.no_color: + + result = f"{vhost} [{response.status_code}] [{server}] [{content}] [{title}] [{word}] " + + else: + + result = f"{bold}{white}{vhost} [{bold}{blue}{response.status_code}{reset}] [{bold}{magenta}{server}{reset}] [{bold}{yellow}{content}{reset}] [{bold}{cyan}{title}{reset}] [{cyan}{word}{reset}]" + + + if args.exclude: + + if str(response.status_code) in args.exclude: + + pass + + print(f"{result}\n") + + if args.output : + + save(result, args) + + else: + + pass + + except KeyboardInterrupt as e: + + print(f"\n[{bold}{blue}INFO{reset}]: {bold}{white}Probuster exits..{reset}") + + exit() + + except requests.RequestException as e: + + if args.verbose: + + print(f"[{bold}{red}TIME-OUT{reset}]: {bold}{white}{url}{reset}") + + + except Exception as e: + + pass + + + +def vhost_threader(hosts, url, args) : + + try: + + if args.show_progress: + + with alive_bar(len(hosts), enrich_print=False) as bar: + + try: + + + with concurrent.futures.ThreadPoolExecutor(max_workers=args.concurrency) as executor: + + + futures = [executor.submit(vhost_req,host, url, args) for host in hosts] + + for futures in concurrent.futures.as_completed(futures): + + bar() + + + except KeyboardInterrupt as e: + + print(f"\n[{bold}{blue}INFO{reset}]: {bold}{white}Probuster exits..{reset}") + + exit() + + except Exception as e: + + pass + + else: + + try: + + with concurrent.futures.ThreadPoolExecutor(max_workers=args.concurrency) as executor: + + + futures = [executor.submit(vhost_req,host, url, args) for host in hosts] + + + concurrent.futures.wait(futures) + + + except KeyboardInterrupt as e: + + print(f"\n[{bold}{blue}INFO{reset}]: {bold}{white}Probuster exits..{reset}") + + exit() + + except Exception as e: + + pass + + + except KeyboardInterrupt as e: + + + print(f"\n[{bold}{blue}INFO{reset}]: {bold}{white}Probuster exits..{reset}") + + + exit() + + except Exception as e: + + pass + + + + +warnings.resetwarnings() \ No newline at end of file diff --git a/probuster/modules/wordlist/__init__.py b/probuster/modules/wordlist/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/probuster/modules/wordlist/__pycache__/__init__.cpython-311.pyc b/probuster/modules/wordlist/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000..e8d2830 Binary files /dev/null and b/probuster/modules/wordlist/__pycache__/__init__.cpython-311.pyc differ diff --git a/probuster/modules/wordlist/__pycache__/__init__.py b/probuster/modules/wordlist/__pycache__/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/probuster/modules/wordlist/__pycache__/wordlist.cpython-311.pyc b/probuster/modules/wordlist/__pycache__/wordlist.cpython-311.pyc new file mode 100644 index 0000000..3dfa8c8 Binary files /dev/null and b/probuster/modules/wordlist/__pycache__/wordlist.cpython-311.pyc differ diff --git a/probuster/modules/wordlist/wordlist.py b/probuster/modules/wordlist/wordlist.py new file mode 100644 index 0000000..5a8496f --- /dev/null +++ b/probuster/modules/wordlist/wordlist.py @@ -0,0 +1,109 @@ +import os +from colorama import Fore,Back,Style +import random + +red = Fore.RED + +green = Fore.GREEN + +magenta = Fore.MAGENTA + +cyan = Fore.CYAN + +mixed = Fore.RED + Fore.BLUE + +blue = Fore.BLUE + +yellow = Fore.YELLOW + +white = Fore.WHITE + +reset = Style.RESET_ALL + +bold = Style.BRIGHT + +colors = [ green, cyan, blue] + +random_color = random.choice(colors) + + +def common_loader(filename): + + try: + + with open(filename, "r") as data : + + datas = data.read().splitlines() + + return datas + + except FileNotFoundError as e: + + print(f"[{bold}{red}INFO{reset}]: {bold}{white}Pleach check the {filename} exists..{reset}") + + exit() + + except KeyboardInterrupt as e: + + print(f"\n[{bold}{blue}INFO{reset}]: {bold}{white}Probuster exits..{reset}") + + exit() + + except Exception as e: + + pass + + +def default_dns() : + + try: + + with open("dns.txt", "r") as data : + + datas = data.read().splitlines() + + return datas + + except FileNotFoundError as e: + + print(f"[{bold}{red}INFO{reset}]: {bold}{white}Problem in loading inbuilt wordlists please provide a wordlist for DNS Enumeration{reset}") + + exit() + + except KeyboardInterrupt as e: + + print(f"\n[{bold}{blue}INFO{reset}]: {bold}{white}Probuster exits..{reset}") + + exit() + + except Exception as e: + + pass + + +def default_dirb() : + + try: + + with open("dirb.txt", "r") as data : + + datas = data.read().splitlines() + + return datas + + except FileNotFoundError as e: + + print(f"[{bold}{red}INFO{reset}]: {bold}{white}Problem in loading inbuilt wordlists please provide a wordlist for Directory or Files Enumeration{reset}") + + exit() + + except KeyboardInterrupt as e: + + print(f"\n[{bold}{blue}INFO{reset}]: {bold}{white}Probuster exits..{reset}") + + exit() + + except Exception as e: + + pass + diff --git a/probuster/probuster.py b/probuster/probuster.py new file mode 100644 index 0000000..9a42948 --- /dev/null +++ b/probuster/probuster.py @@ -0,0 +1,15 @@ +from .modules.handler import handler + +def main(): + + try: + + handler() + + except Exception as e: + + exit() + +if __name__ == "__main__": + + main() \ No newline at end of file