_Ak='%Y-%m-%d %H:%M:%S'
_Aj='Suspicious.txt'
_Ai='Uploaders.txt'
_Ah='PHPMailer.txt'
_Ag='Shells_Passwords.txt'
_Af='Shells.txt'
_Ae='Leaf PHPMailer'
_Ad='%PDF-0-1<form action="" method="post"><input type="text" name="_rg"><input type="submit" value=">>"'
_Ac='input type="submit" value=">>"'
_Ab='>Password<br><input'
_Aa='type=password name=pass'
_AZ='<pre align=center><form method=post>Password<br><input type=password name=pass'
_AY='L I E R SHELL'
_AX='Upload File : <input type="file" name="file"'
_AW='input type="hidden" name="path" value='
_AV='input type="submit" name="test" value="Upload"'
_AU='input type="file" name="image"'
_AT='input type="submit" name="upl_files" value="upload"'
_AS='input type="file" name="mbdfiles"'
_AR='input type="file" name="image"><input type="Submit" name="Submit" value="Submit"'
_AQ='input type="submit" name="upload" value="Uploader"'
_AP='input type="file" name="upload"'
_AO='input type="file" name="filename"'
_AN='type="file"><br><input'
_AM='input name="fnm" type="file"/><input type="submit" value="'
_AL='input type="file" class="input" name="file"'
_AK='input type="file" name="__"><input name="_" type="submit" value="Upload"'
_AJ='input class="Input" type="file" name="file_n[]"'
_AI='input name="passw" value=""><input name="dir"'
_AH='input name="message" type="file"'
_AG='input type="file" name="file'
_AF='input type="file" name="fileToUpload" id="fileToUpload"'
_AE='input type="file" name="file"><input name="_upl" type="submit" id="_upl" value="Upload"'
_AD='C0d3d By Dr.D3m0'
_AC='Mr.Combet WebShell'
_AB='One Hat Cyber Team'
_AA='Graybyt3 Was Here'
_A9='#wp_config_error#'
_A8='PHU Mini Shell'
_A7='[ Mini Shell ]'
_A6='#No_Identity 2.4.3'
_A5='TEAM-0ROOT'
_A4='[+] MINI SH3LL BYPASS [+]'
_A3='Doc Root:'
_A2='CHips L Pro sangad'
_A1='ineSec Team Shell'
_A0='MARIJuANA'
_z='B Ge Team File Manager'
_y='aDriv4-Priv8 TOOL'
_x='FileManager Version 0.2 by ECWS'
_w='Mini Shell By Black_Shadow'
_v='[ ! ] Cilent Shell Backdor [ ! ]'
_u='Current directory:'
_t='Minishell'
_s='<title>FierzaXploit</title>'
_r='Simple,Responsive & Powerfull'
_q='- FierzaXploit -'
_p='Fighter Kamrul Plugin'
_o='TEAM-0ROOT Uploader'
_n='>Cassano Bypass <'
_m='Webshell V1.0'
_l='Franz Private Shell'
_k='[+[MAD TIGER]+]'
_j='Copyright negat1ve1337'
_i='Negat1ve Shell'
_h='<title>Mini Shell</title>'
_g='RC-SHELL v2.0.2011.1009'
_f='[ HOME SHELL ] '
_e='UnknownSec Shell'
_d='shell bypass 403'
_c='UnknownSec'
_b='Code By Kelelawar Cyber Team'
_a='xXx Kelelawar Cyber Team xXx'
_Z='| PHP 7.4.20 |'
_Y='BlackDragon'
_X='bondowoso black hat shell'
_W='File manager -'
_V='<title>MARIJUANA</title>'
_U='AnonSec Shell'
_T='Indonesian Darknet'
_S='403WebShell'
_R='LIT COUSRE TEAM'
_Q='x3x3x3x_5h3ll'
_P='Simple File Manage Design by index.php'
_O='type="button">Upload File<'
_N='{Ninja-Shell}'
_M='Gel4y Mini Shell'
_L='FilesMAn'
_K='Yanz Webshell!'
_J='Uname:'
_I='TheShell 1.5 / Since 2024'
_H='input type="file" name="uploaded_file"'
_G='input name="fnm" type="file"/><input type="submit"'
_F='input name="uploadedfile" type="file"/><input type="submit" value="Upload File"'
_E='input type="file" name="files[]" id="file-input"'
_D='Current dir:'
_C='Mini Shell'
_B='Powered By Indonesian Darknet'
_A='/'
import sys,requests,re
from multiprocessing.dummy import Pool as ThreadPool
from colorama import Fore,init
import time
from datetime import datetime
init(autoreset=True)
fr=Fore.RED
fg=Fore.GREEN
fy=Fore.YELLOW
fb=Fore.BLUE
fw=Fore.WHITE
requests.packages.urllib3.disable_warnings()
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','Accept':'application/json, text/plain, */*','Accept-Language':'en-US,en;q=0.9','Accept-Encoding':'gzip, deflate, br','Connection':'keep-alive'}
SIGNS=[_I,_J,_K,_L,_M,_N,_O,_P,_Q,_R,_S,_T,_U,_B,_V,_W,_X,_Y,_Z,_a,_b,_c,_d,_e,_f,_g,_h,_C,_i,_j,_k,_l,_m,_n,_o,_p,_q,_r,_s,_D,_t,_u,_v,_B,_C,_w,_D,_x,_y,_z,_A0,_A1,_A2,_A3,_A4,_A5,_A6,_A7,_A8,'MSQ_403',_A9,_AA,_AB,_AC,_AD,_G,_H,_AE,_AF,_E,_AG,_AH,_AI,_AJ,_AK,_AL,_AM,_F,_E,_AN,_AO,_AP,_F,_AQ,_AR,_AS,_AT,_AU,_AV,_AW,_AX,_AY,_AZ,_Aa,_Ab,_Ac,_Ad,_Ae]
STRINGS_SHELLS=[_I,_J,_K,_L,_AY,'-rw-r--r--',_M,_N,_O,_P,_Q,_R,_S,_T,_U,_B,_V,_W,_X,_Y,_Z,_a,_b,_c,_d,_e,_f,_g,_h,_C,_i,_j,_k,_l,_m,_n,_o,_p,_q,_r,_s,_D,_t,_u,_v,_B,_C,_w,_D,_x,_y,_z,_A0,_A1,_A2,_A3,_A4,_A5,_A6,_A7,_A8,'MSQ_403',_A9,_AA,_AB,_AC,_AD,'Zerion Mini Shell']
STRINGS_PASS_SHELLS=[_AZ,_Aa,_Ab,_Ac,_Ad]
STRINGS_UPLOADS=[_G,_H]
STRINGS_UPLOADS=[_G,_H,_AE,_AF,_E,_AG,_AH,_AI,_AJ,_AK,_AL,_AM,_F,_E,_AN,_AO,_AP,_F,_AQ,_AR,_AS,_AT,_AU,_AV,_AW,_AX]
STRINGS_PHPMAILER=[_Ae]
VALID_EXTENSIONS=['.php','.phtml','.php3','.php4','.phar','.shtml','.cgi','.py','.sh','.alfa','.pl']
INVALID_EXTENSIONS=['.txt','.js','.css','.jpg','.jpeg','.png','.gif','.ico']
class ShellScanner:
	def __init__(A):A.start_time=time.time();A.scanned_count=0;A.found_count=0;A.error_count=0
	def get_domain(D,site):
		A=site
		try:A=A.strip().lower();A=A.replace('http://','').replace('https://','');B=A.split(_A)[0];return B.split(':')[0]
		except Exception as C:print(f"{fr}[!] Error processing domain {A}: {C}");return
	def is_index_of(B,content):A=['<title>Index of','Index of /','Directory Listing For','Parent Directory</a>','Proudly Served by LiteSpeed Web Server'];return any(A in content for A in A)
	def send_request(C,url,path):
		try:
			A=f"{url.rstrip(_A)}/{path.lstrip(_A)}"
			if len(A)<=300:B=requests.get(A,headers=headers,timeout=15,verify=False);return B
		except requests.RequestException:return
	def is_valid_file(B,name):A=name;A=A.lower();return any(A.endswith(B)for B in VALID_EXTENSIONS)and not any(A.endswith(B)for B in INVALID_EXTENSIONS)
	def extract_paths(D,content):
		B=set();C='<a\\s+href="([^"]+)"'
		for A in re.findall(C,content):
			if any(B in A for B in['http://','https://','?','#','javascript:']):continue
			A=A.strip(_A)
			if A and A not in['..','.']:B.add(A)
		return list(B)
	def check_backdoors(D,response):
		A=response
		if A and A.status_code==200:
			C=A.text.lower()
			for B in SIGNS:
				if B.lower()in C:return B
	def write_result(D,filename,url):
		A=filename
		try:
			with open(A,'a')as B:B.write(f"{url}\n")
		except Exception as C:print(f"{fr}[!] Error writing to {A}: {C}")
	def check_file(B,base_url,file_path):
		E=file_path;D=base_url
		try:
			A=f"{D.rstrip(_A)}/{E.lstrip(_A)}";F=B.send_request(D,E);C=B.check_backdoors(F)
			if C:
				B.found_count+=1
				if C in STRINGS_SHELLS:print(f"{fg}[+] Shell found: {A}");B.write_result(_Af,A)
				elif C in STRINGS_PASS_SHELLS:print(f"{fy}[+] Password-protected shell found: {A}");B.write_result(_Ag,A)
				elif C in STRINGS_PHPMAILER:print(f"{fg}[+] PHPMailer found: {A}");B.write_result(_Ah,A)
				elif C in STRINGS_UPLOADS:print(f"{fg}[+] Uploader found: {A}");B.write_result(_Ai,A)
				else:print(f"{fg}[+] Suspicious file found: {A}");B.write_result(_Aj,A)
			else:print(f"{fr}[-] Not vulnerable: {A}")
			B.scanned_count+=1
		except Exception as G:B.error_count+=1;print(f"{fr}[!] Error checking {A}: {G}")
	def traverse_directory(B,base_url,path,visited_paths=None):
		D=visited_paths;C=base_url;A=path
		if D is None:D=set()
		A=f"/{A.strip(_A)}/"if A else _A
		if A in D:return
		D.add(A)
		try:
			E=B.send_request(C,A)
			if E and E.status_code==200:
				if B.is_index_of(E.text):
					for F in B.extract_paths(E.text):
						G=f"{A}{F}".replace('//',_A)
						if B.is_valid_file(F):B.check_file(C,G)
						elif not'.'in F:B.traverse_directory(C,G,D)
				else:print(f"{fw}[i] Non-index page: {C}{A}")
		except Exception as H:B.error_count+=1;print(f"{fr}[!] Error traversing {C}{A}: {H}")
	def scan_site(A,site):
		try:
			B=A.get_domain(site)
			if not B:return
			C=f"http://{B}";print(f"\n{fb}[*] Scanning: {C}")
			with open('Path.txt','r')as D:E=[A.strip()for A in D if A.strip()]
			for F in E:A.traverse_directory(C,F)
		except Exception as G:A.error_count+=1;print(f"{fr}[!] Error scanning {site}: {G}")
	def print_stats(A):B=time.time()-A.start_time;print(f"\n{fg}=== Scan Complete ===");print(f"Duration: {B:.2f} seconds");print(f"Files Scanned: {A.scanned_count}");print(f"Shells Found: {A.found_count}");print(f"Errors: {A.error_count}")
def main():
	D=f"""{fb}
           █▓▄▄▄████▀▀███████▄▄▄
          ▄███████▀██▄▄▄▄▄█████████▄
       ▄███▓▓▓██▄███████████████████▓▓▄
     ▄███▀█▀▀ ▀████████████████▓▌ ▀█▀█▓▓▄
   ▄███▓▓▀     ▀██████████████▓▀    ▀▄▀██▓▄
  ▄██▀▄▀         ▀███████████▓▀    ▄  ▀███▓▄
  ██▀▓▀   ▀        ██▀██▄█▀█▓ ▀  ▄▀     ███▓▓
 ███▓▀  ▄▄   ▀      ▀█▀ ▀█▓▀   ▄     ▄▀  ████▓
▐██▌█        ▄▄  ▀▄ ▄███▓▄ ▀       ▀     ▐███▓
▐█▓▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄ ▐█████▓▓ ▄▄▄▄▄███████▄▄████
▐██▌███████████▀██▄ ▀█▓▓▓▀ ▄█████████████▓▐██▓
 ██▓ ███████████████▄    ▄██████████████▓▌██▓
 ▀██▓▀█████████████▓▀    ▀██████████████▀███▀
  ▀██████████████▓▀        ▀████▄▀█████▓███▓
    ██▓▄▀██████▓▓            ▀███████▓▄██▓▀
     ▀███▓███▓▀   t.me:X7ROOT   ▀██▓▓███▓▀
       ▀▀█▓▓▓                    ████▓▀
          ▀▀█████▀██▀████████████▓▓▀
               ▀▀▀████████▓▓▓▓▓▀
    """;print(D)
	try:
		if len(sys.argv)<2:print(f"{fr}[!] Usage: python3 {sys.argv[0]} <sites.txt>");return
		with open(sys.argv[1],'r')as E:B=[A.strip()for A in E if A.strip()]
		C=ShellScanner();print(f"{fg}[*] Starting scan with {len(B)} targets");A=ThreadPool(100);A.map(C.scan_site,B);A.close();A.join();C.print_stats()
	except Exception as F:print(f"{fr}[!] Fatal error: {F}")
if __name__=='__main__':
	try:
		start_time=time.time();print(f"{fb}[*] Scan started at: {datetime.now().strftime(_Ak)}")
		if len(sys.argv)<2:script_name=sys.argv[0].split('\\')[-1];print(f"{fr}[!] Usage: python3 {script_name} <sites.txt>");sys.exit(1)
		def read_input_file(filename):
			C='utf-8';B=filename;D=[C,'latin1','iso-8859-1','cp1252']
			for E in D:
				try:
					with open(B,'r',encoding=E)as A:return[A.strip()for A in A if A.strip()]
				except UnicodeDecodeError:continue
			print(f"{fy}[!] Warning: Using UTF-8 with error ignore")
			with open(B,'r',encoding=C,errors='ignore')as A:return[A.strip()for A in A if A.strip()]
		target_sites=read_input_file(sys.argv[1])
		if not target_sites:print(f"{fr}[!] No valid targets found in {sys.argv[1]}");sys.exit(1)
		scanner=ShellScanner();current_time=datetime.now().strftime(_Ak);file_headers={_Af:'# Shell Results - Scan started at '+current_time,_Ag:'# Password Protected Shells - Scan started at '+current_time,_Ah:'# PHPMailer Results - Scan started at '+current_time,_Ai:'# Uploader Results - Scan started at '+current_time,_Aj:'# Suspicious Files - Scan started at '+current_time}
		for(filename,header)in file_headers.items():
			with open(filename,'w')as f:f.write(header+'\n\n')
		print(f"{fg}[*] Loaded {len(target_sites)} targets");print(f"{fg}[*] Thread pool size: 100");print(f"{fg}[*] Starting scan...\n")
		try:pool=ThreadPool(100);pool.map(scanner.scan_site,target_sites)
		except KeyboardInterrupt:print(f"\n{fy}[!] Scan interrupted by user");pool.terminate()
		except Exception as e:print(f"{fr}[!] Thread pool error: {e}")
		finally:pool.close();pool.join()
		end_time=time.time();duration=end_time-start_time;print(f"\n{fg}={'='*50}");print(f"{fg}[*] Scan Completed");print(f"{fg}[*] Duration: {duration:.2f} seconds");print(f"{fg}[*] Sites Scanned: {scanner.scanned_count}");print(f"{fg}[*] Shells Found: {scanner.found_count}");print(f"{fg}[*] Errors Encountered: {scanner.error_count}");print(f"{fg}[*] Results saved to:")
		for filename in file_headers.keys():print(f"{fg}    - {filename}")
		print(f"{fg}={'='*50}")
	except KeyboardInterrupt:print(f"\n{fy}[!] Program terminated by user");sys.exit(0)
	except Exception as e:print(f"{fr}[!] Fatal error: {e}");sys.exit(1)