import sys, os, time from time import sleep # --- # Colors # --- class Colors: RED = "\033[0;31m" YELLOW = "\033[0;33m" GREEN = "\033[0;32m" BLUE = "\033[0;34m" CYAN = "\033[96m" WHITE = '\33[97m' ENDC = "\033[0m" # --- # Helper Functions # --- def clear_screen(): """Clears the console screen.""" os.system('cls' if os.name == 'nt' else 'clear') def check_and_install(package_name): """Checks if a package is installed and installs it if not.""" try: __import__(package_name) except ImportError: print(f"Installing {package_name}...") os.system(f"pip install {package_name}") def print_banner(text, color): """Prints a centered banner with a horizontal line.""" try: columns = os.get_terminal_size().columns except OSError: columns = 80 # Fallback for non-interactive environments print(color + "=" * columns + Colors.ENDC) print(color + text.center(columns) + Colors.ENDC) print(color + "=" * columns + Colors.ENDC) def animated_text(words, color): """Prints text with a typewriter effect.""" for char in words: sys.stdout.write(color + char + Colors.ENDC) sys.stdout.flush() sleep(0.05) print() def check_internet(): """Checks for an internet connection.""" url = "http://www.facebook.com" try: requests.get(url, timeout=5) print(Colors.GREEN + "\nConnected to the internet." + Colors.ENDC) sleep(1) return True except (requests.ConnectionError, requests.Timeout): print(Colors.RED + "\nNo internet connection. Please check your network." + Colors.ENDC) return False # --- # Main Script # --- if __name__ == "__main__": clear_screen() # Check and install required Python packages check_and_install('requests') check_and_install('colorama') import requests from colorama import init, Fore, Style init(autoreset=True) logo = f""" _____ _ _____ _ _ / ____| | | / ____| | | | | | _ _| |__ ___ _ __ | (___ | |__| | | | | | | | '_ \ / _ \ '__| \___ \| __ | | |___| |_| | |_) | __/ | ____) | | | | \_____\__, |_.__/ \___|_| |_____/|_| |_| __/ | |___/""" print(Colors.RED + logo + Colors.ENDC) print(Colors.GREEN + "\t\tDeveloped By : SH TASRIF" + Colors.ENDC) print(Colors.CYAN + "\t ✯✯ CyberSH Tools Installer ✯✯" + Colors.ENDC) print_banner("", Colors.YELLOW) animated_text("\t\t✯✯ CyberSH Tools Installer ✯✯", Fore.GREEN) clear_screen() print(Colors.RED + logo + Colors.ENDC) print(Colors.GREEN + "\t\tDeveloped By : SH TASRIF" + Colors.ENDC) print(Colors.CYAN + "\t ✯✯ CyberSH Tools Installer ✯✯" + Colors.ENDC) print_banner("", Colors.YELLOW) if not check_internet(): sys.exit() print(Fore.GREEN + "\t\tChecking Basic Tools..." + Style.RESET_ALL) # Check and install system packages (assuming Termux/Linux) print(Fore.GREEN + '\n\tPlease Wait. Checking Git...' + Style.RESET_ALL) os.system('pkg install git -y') print(Fore.GREEN + '\n\tPlease Wait. Checking python2...' + Style.RESET_ALL) os.system('pkg install python2 -y') print(Fore.GREEN + '\n\tPlease Wait. Checking nano...' + Style.RESET_ALL) os.system('pkg install nano -y') print(Fore.GREEN + '\n\tPlease Wait. Checking figlet...' + Style.RESET_ALL) os.system('pkg install figlet -y') print(Fore.GREEN + '\n\tPlease Wait. Checking Ruby...' + Style.RESET_ALL) os.system('pkg install ruby -y') print(Fore.GREEN + '\n\tPlease Wait. Checking lolcat...' + Style.RESET_ALL) os.system('gem install lolcat') print(Fore.GREEN + '\n\tPlease Wait. Checking mechanize...' + Style.RESET_ALL) os.system("pip2 install mechanize") clear_screen() print(Colors.RED + logo + Colors.ENDC) print(Colors.GREEN + "\t\tDeveloped By : SH TASRIF" + Colors.ENDC) print(Colors.CYAN + "\t ✯✯ CyberSH Tools Installer ✯✯" + Colors.ENDC) print_banner("", Colors.YELLOW) print(Fore.YELLOW + '\tAll pkg install Done..........!!' + Style.RESET_ALL) time.sleep(2) clear_screen() print(Colors.RED + logo + Colors.ENDC) print(Colors.GREEN + "\t\tDeveloped By : SH TASRIF" + Colors.ENDC) print(Colors.CYAN + "\t ✯✯ CyberSH Tools Installer ✯✯" + Colors.ENDC) print_banner("", Colors.YELLOW) print(Fore.GREEN + '\n\t\t Cloning Tools\n' + Style.RESET_ALL) time.sleep(1.5) os.system("cd $HOME && rm -rf cybersh && git clone https://github.com/ShTasrif/cybersh") os.system("cd $PREFIX/bin && echo 'cd $HOME ; cd cybersh ; python main.py' > cybersh && chmod +x cybersh") clear_screen() print(Colors.RED + logo + Colors.ENDC) print(Colors.GREEN + "\t\tDeveloped By : SH TASRIF" + Colors.ENDC) print(Colors.CYAN + "\t ✯✯ CyberSH Tools Installer ✯✯" + Colors.ENDC) print_banner("", Colors.YELLOW) print(Colors.GREEN + "\n\t Successfully Installed CyberSH Tools [✓]" + Colors.ENDC) print(Colors.CYAN + "\n\t >> From Now, Just Write " + Colors.YELLOW + "cybersh" + Colors.BLUE + "\n\n\t Then press enter to open CyberSH Tools" + Colors.ENDC) print("\n\n\n")