Upload files to "Modules/All_Pages"
This commit is contained in:
8
Modules/All_Pages/center_text.py
Normal file
8
Modules/All_Pages/center_text.py
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import os # To use os.get_terminal_size()
|
||||||
|
|
||||||
|
def center_text(text):
|
||||||
|
terminal_width = os.get_terminal_size().columns
|
||||||
|
centered_lines = []
|
||||||
|
for line in text.splitlines():
|
||||||
|
centered_lines.append(line.center(terminal_width))
|
||||||
|
return "\n".join(centered_lines)
|
9
Modules/All_Pages/clear_screen.py
Normal file
9
Modules/All_Pages/clear_screen.py
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import os
|
||||||
|
import platform
|
||||||
|
|
||||||
|
def clear_screen():
|
||||||
|
# Check the system platform and use the appropriate command
|
||||||
|
if platform.system().lower() == "windows":
|
||||||
|
os.system('cls') # Windows command to clear the screen
|
||||||
|
else:
|
||||||
|
os.system('clear') # Unix-based (Linux/macOS) command to clear the screen
|
44
Modules/All_Pages/random_tip.py
Normal file
44
Modules/All_Pages/random_tip.py
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import random
|
||||||
|
from colorama import Fore, Style
|
||||||
|
|
||||||
|
TIPS = [
|
||||||
|
"💻 Run sqlmap while you are waiting.",
|
||||||
|
"📂 Look for simple files that may seem obvious.",
|
||||||
|
"🔑 Have you tried admin:admin yet?",
|
||||||
|
"🕵️♂️ Check for hidden directories using DirBuster.",
|
||||||
|
"🤖 Always review robots.txt for hidden paths.",
|
||||||
|
"✨ Sometimes the easiest solutions are the best.",
|
||||||
|
"🔐 Test default credentials; they might surprise you.",
|
||||||
|
"📥 Check the server response headers for hints.",
|
||||||
|
"📜 Try fuzzing parameter values for unexpected results.",
|
||||||
|
"💬 Look for comments in the page source; they may reveal hints.",
|
||||||
|
"📂 Check if the site is vulnerable to directory traversal.",
|
||||||
|
"🔍 Have you enumerated all open ports yet?",
|
||||||
|
"🔑 Try brute-forcing login pages with common credentials.",
|
||||||
|
"🛠️ Use Burp Suite's intruder to test inputs.",
|
||||||
|
"🌐 Don't forget to check for subdomains.",
|
||||||
|
"🔒 Scan for SSL/TLS vulnerabilities using sslscan.",
|
||||||
|
"🌐 Always test HTTP and HTTPS separately.",
|
||||||
|
"🔎 Review the page source for hidden or disabled form fields.",
|
||||||
|
"🗂️ Use gobuster or dirbuster for brute-forcing paths.",
|
||||||
|
"📂 Check for backup files like .bak or .old.",
|
||||||
|
"🔍 Enumerate hidden parameters with tools like Arjun.",
|
||||||
|
"📦 Scan for default CMS installations like WordPress or Joomla.",
|
||||||
|
"🛠️ Review JavaScript files for exposed API keys.",
|
||||||
|
"🍪 Test for weak session cookies with predictable values.",
|
||||||
|
"🌐 Try manipulating URL parameters to bypass restrictions.",
|
||||||
|
"🖥️ Use Nmap scripts to scan for vulnerabilities.",
|
||||||
|
"📡 Search for exploits based on software versions.",
|
||||||
|
"💾 Check for database dumps left exposed on the server.",
|
||||||
|
"📝 Look for writable directories to upload payloads.",
|
||||||
|
"📤 Test file uploads for bypassing extensions or MIME types.",
|
||||||
|
"🛡️ Check for weak or missing Content Security Policies.",
|
||||||
|
"⏳ Try timing attacks to uncover blind SQLi vulnerabilities.",
|
||||||
|
]
|
||||||
|
|
||||||
|
COLORS = [Fore.RED, Fore.GREEN, Fore.BLUE, Fore.MAGENTA, Fore.CYAN, Fore.YELLOW, Fore.WHITE]
|
||||||
|
|
||||||
|
def get_random_tip_with_color():
|
||||||
|
tip = random.choice(TIPS)
|
||||||
|
color = random.choice(COLORS)
|
||||||
|
return f"{color}{tip}{Style.RESET_ALL}"
|
83
Modules/All_Pages/wrappers.py
Normal file
83
Modules/All_Pages/wrappers.py
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
import subprocess
|
||||||
|
from colorama import Fore, Style
|
||||||
|
|
||||||
|
from Assets.ascii_text_prompts import ascii_art, full_ascii_art, infinitei
|
||||||
|
from Modules.All_Pages.clear_screen import clear_screen
|
||||||
|
from Modules.All_Pages.random_tip import get_random_tip_with_color
|
||||||
|
|
||||||
|
from Modules.All_Pages.center_text import *
|
||||||
|
|
||||||
|
from Modules.Login.scan import BACKGROUND_TASK
|
||||||
|
from Modules.Login.check_ip import get_target_ip
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def highlight_ports(port, open_ports): # Highlight a port if it is in the list of open ports.
|
||||||
|
return f"{Fore.GREEN}{port}{Style.RESET_ALL}" if port in open_ports else f"{port}"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def display_background_task():
|
||||||
|
if BACKGROUND_TASK:
|
||||||
|
print("\nBackground Task:")
|
||||||
|
for task in BACKGROUND_TASK:
|
||||||
|
print(f" - {task}")
|
||||||
|
else:
|
||||||
|
print("\nBackground Task: None")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def header(target_ip, open_ports):
|
||||||
|
clear_screen()
|
||||||
|
print(center_text(ascii_art))
|
||||||
|
print(center_text(get_random_tip_with_color()) + "\n")
|
||||||
|
print(center_text(f"Target IP: {target_ip}\n"))
|
||||||
|
if open_ports:
|
||||||
|
print(center_text(f"Open Ports: {', '.join(open_ports)}\n"))
|
||||||
|
else:
|
||||||
|
print(center_text("Open Ports: None\n"))
|
||||||
|
display_background_task() # Include the background tasks section
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def display_menu(menu_options, open_ports, target_ip):
|
||||||
|
while True:
|
||||||
|
header(target_ip, open_ports) # Pass target_ip and open_ports to the header
|
||||||
|
print("\nStandard Enumeration")
|
||||||
|
for key, value in menu_options.items():
|
||||||
|
ports = "/".join([highlight_ports(port, open_ports) for port in value["ports"]])
|
||||||
|
print(f"[{key}] {value['name'].upper()}: Ports {ports}")
|
||||||
|
print("[0] Logout\n")
|
||||||
|
|
||||||
|
choice = input("Enter your choice: ").strip().lower()
|
||||||
|
|
||||||
|
# Match the choice to a menu option
|
||||||
|
if choice in menu_options:
|
||||||
|
menu_options[choice]["submenu"](target_ip, open_ports) # Pass arguments directly
|
||||||
|
elif choice in ["0", "q", "exit", "quit"]:
|
||||||
|
print("Logging out...")
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
print("Invalid choice. Please try again.")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def run_command(title, content, target_ip, open_ports):
|
||||||
|
header(target_ip, open_ports) # Display the header at the top
|
||||||
|
print("=" * 40)
|
||||||
|
print(f"{title.center(40)}")
|
||||||
|
print("=" * 40)
|
||||||
|
print("\n")
|
||||||
|
print("Executing Command:\n")
|
||||||
|
print(content)
|
||||||
|
print("\n")
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Execute the command and display its output in real-time
|
||||||
|
subprocess.run(content, shell=True, check=True)
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
print(f"Error executing command:\n{e}")
|
||||||
|
except Exception as ex:
|
||||||
|
print(f"An unexpected error occurred: {ex}")
|
||||||
|
finally:
|
||||||
|
input("\nPress Enter to return...")
|
Reference in New Issue
Block a user