import os
import time
os.system('pip3 install colorama > /dev/null 2>&1')
import colorama
import sys
from sys import platform
from colorama import Fore, Back, Style
colorama.init()
time.sleep(0.5)
os.system('clear')
def banner():
    print('''

  ____       _                 ____        _       _ _
 |  _ \  ___| |__  _   _  __ _/ ___| _ __ | | ___ (_) |_
 | | | |/ _ \ '_ \| | | |/ _` \___ \| '_ \| |/ _ \| | __|
 | |_| |  __/ |_) | |_| | (_| |___) | |_) | | (_) | | |_
 |____/ \___|_.__/ \__,_|\__, |____/| .__/|_|\___/|_|\__|
                         |___/      |_|
''')
if platform == 'linux' or platform == 'linux2':
    system = input('''
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-    
***********************************************
| 1) Kali Linux / Parrot OS                   |
|                                             |
| 2) Termux                                   |
|---------------------------------------------|

\033[4mdsf\033[0m > ( System ):  ''').strip(" ")
    if system == '1':
        os.system('clear')
        banner()
        time.sleep(0.5)
        print(Fore.BLUE+'[*]'+Fore.RESET+' Installing Requirements... [Kali Linux / Parrot]')
        os.system('apt install adb fastboot telnet > /dev/null 2>&1')
        os.system('pip3 install scapy colorama future pgrep > /dev/null 2>&1')
        print(Fore.BLUE+'[*]'+Fore.RESET+' Cleaning Up... [Kali Linux / Parrot]')
        time.sleep(2)
        print(Fore.YELLOW+'[+]'+Fore.RESET+' Installation Completed!')
        exit()
    elif system == '2':
        os.system('clear')
        banner()
        time.sleep(0.5)
        print(Fore.BLUE+'[*]'+Fore.RESET+' Installing Requirements... [Termux]')
        os.system('apt install adb fastboot telnet > /dev/null 2>&1')
        os.system('apt install python3-pip > /dev/null 2>&1')
        os.system('pip2 install colorama scapy future > /dev/null 2>&1')
        print(Fore.YELLOW+'[+]'+Fore.RESET+' Installation Completed!')
        exit()
    else:
        print(Fore.RED+'[-] FATAL:'+Fore.RESET+' Unknown Command: "'+system+'"')
        exit()
elif platform == 'win32' or platform == 'win64':
    time.sleep(0.6)
    print(Fore.RED+'[-]'+Fore.RESET+' Windows Detected!')
    print(Fore.BLUE+'[*]'+Fore.RESET+' Please Make Sure You Have Installed ADB!')
    time.sleep(2)
    print(Fore.BLUE+'[*]'+Fore.RESET+' Installing Dependiences...')
    os.system('pip install requests colorama paramiko argparse future scapy')
    print(Fore.BLUE+'[*]'+Fore.RESET+' Cleaning Up...')
    time.sleep(2)
    print(Fore.YELLOW+'[+]'+Fore.RESET+' Installation Succesfull!')
    exit()
elif platform == 'darwin':
    print(Fore.RED+'[-]'+Fore.RESET+' Not Supported...')
    exit()
