diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a1d9a76 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/content +*/__pycache__/ diff --git a/README.md b/README.md index 465fef1..862c8ca 100644 --- a/README.md +++ b/README.md @@ -69,8 +69,6 @@ pip3 install -r requirements.txt python3 thetimemachine.py [OPTIONS] ``` -**Note:** Don't use `http://` or `https://` in the domain — just pass `domain.com` or `sub.domain.com`. - --- ## 📋 Options diff --git a/requirements.txt b/requirements.txt index 000ce39..74d4d9c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ colorama==0.4.4 -numpy>=1.26.0 requests>=2.31.0 rich>=13.6.0 termcolor>=2.4.0 -PyJwt +PyJWT diff --git a/thetimemachine.py b/thetimemachine.py index a08b557..0a56999 100644 --- a/thetimemachine.py +++ b/thetimemachine.py @@ -1,6 +1,8 @@ # thetimemachine.py import os +import sys import argparse +from urllib.parse import urlparse from core import ( fetcher, jwtxposer, @@ -12,11 +14,11 @@ ) from core.ui import show_loader, print_banner from core.utils import load_extensions_from_file -from core.menu import launch_interactive_menu from core.parameters import extract_parameters -from core.subdomains import extract_subdomains_from_urls from core.lister import scan_for_listings -from core.fetcher import console +from core.fetcher import console + + def main(): parser = argparse.ArgumentParser(description='⏳ TheTimeMachine - Wayback Recon Suite') parser.add_argument("target", help="Target domain") @@ -29,9 +31,17 @@ def main(): parser.add_argument("--menu", action="store_true", help="Launch interactive menu") parser.add_argument("--parameters", action="store_true", help="Extract GET parameters from URLs") + # Show usage if no `--` options are provided + if not any(arg.startswith('--') for arg in sys.argv[1:]): + parser.print_usage() + return args = parser.parse_args() - target = args.target + + # Extract target using urlparse + if "://" not in args.target: + args.target = "//" + args.target + target = urlparse(args.target).hostname.lower() content_dir = f"content/{target}" os.makedirs(content_dir, exist_ok=True) @@ -42,7 +52,7 @@ def main(): # Use a spinner for animation with console.status("[bold cyan]Contacting archive dimension...[/bold cyan]", spinner="dots"): urls, output_path = fetcher.fetch_wayback_urls(target) - + if urls: console.print(f"[bold green]URLs successfully written to {output_path}[/bold green]") else: @@ -69,11 +79,10 @@ def main(): else: print(f"[+] Using extensions: {', '.join(backup_exts)}") backupfinder.fetch_backup_urls(target, backup_exts) - + if args.listings: scan_for_listings(target, threads=10) # You can customize the thread count - if args.attack: result = attackmode.pattern_match_mode(urls_file, args.attack, db_folder="db") if result: @@ -86,6 +95,7 @@ def main(): if args.menu: menu.launch_interactive_menu(urls, target) + if __name__ == "__main__": print_banner() show_loader()