-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbyakugan_finder.py
More file actions
83 lines (70 loc) Β· 3.06 KB
/
byakugan_finder.py
File metadata and controls
83 lines (70 loc) Β· 3.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import os
import requests
import concurrent.futures
from colorama import Fore, Style, init
import argparse
# Initialize colorama for colorful terminal output
init(autoreset=True)
# ASCII Art Banner
BANNER = f"""{Fore.BLUE}
__ __ __ __ __ __ ______ ______
/\ \_\ \ /\ \_\ \ /\ \/\ \ /\ ___\ /\ __ \
\ \ __ \\ \____ \\ \ \_\ \\ \ \__ \\ \ __ \
\ \_\ \_\\/\_____\\ \_____\\ \_____\\ \_\ \_\
\/_/\/_/ \/_____/ \/_____/ \/_____/ \/_/\/_/
----------------------------------------------------------
ποΈ BYAKUGAN FINDER: Admin Panel Scanner
Developer: Krupal Prajapati (https://github.com/Krupal1574)
----------------------------------------------------------
"""
# Display Banner
os.system("cls" if os.name == "nt" else "clear")
print(Style.BRIGHT + BANNER)
# Argument parser for command-line usage
parser = argparse.ArgumentParser(description="Byakugan Finder: Admin Panel Scanner")
parser.add_argument("-u", "--url", required=True, help="Target base URL (e.g., https://example.com/)")
parser.add_argument("-w", "--wordlist", default="path.txt", help="Wordlist file (default: path.txt)")
parser.add_argument("-o", "--output", default="found_panels.txt", help="Output file to save results (default: found_panels.txt)")
args = parser.parse_args()
# Validate URL format
base_url = args.url.rstrip("/")
wordlist_file = args.wordlist
output_file = args.output
# Load paths from wordlist file
try:
with open(wordlist_file, "r") as f:
paths = [line.strip() for line in f.readlines()]
except FileNotFoundError:
print(Fore.RED + f"\n [!] Wordlist file '{wordlist_file}' not found!")
exit()
# Open output file once to save found results
found_urls = []
# Function to scan paths
def scan(path):
try:
url = f"{base_url}/{path}"
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
"(KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
}
session = requests.Session()
response = session.get(url, timeout=10, headers=headers)
if response.status_code < 400:
result = f"[+] Found: {url} (Status: {response.status_code})"
print(Fore.GREEN + result)
found_urls.append(result)
else:
print(Fore.RED + f"[-] Not Found: {url} (Status: {response.status_code})")
except requests.RequestException:
print(Fore.YELLOW + f"[!] Connection Failed: {url}")
# Run scanning with multithreading
print(Fore.CYAN + f"\n [*] Byakugan Activated... Scanning {len(paths)} paths!\n")
with concurrent.futures.ThreadPoolExecutor(max_workers=10) as executor:
executor.map(scan, paths)
# Save results to file
if found_urls:
with open(output_file, "w") as f:
f.write("\n".join(found_urls))
print(Fore.BLUE + f"\n [+] Scan Complete! Results saved in {output_file}")
else:
print(Fore.RED + "\n [!] No admin panels found! Try using a better wordlist.")