def main(): continue_program = True m = menu() if m == 1: user_thread= True elif m == 2: user_thread = False else: continue_program = False if continue_program: if user_thread: print(f"{Fore.LIGHTMAGENTA_EX}[WARNING]{Style.RESET_ALL} Do not put a lot of threads or you will crash. 2 threads is decent. (chrome windows)") num_thread = int(input(f"{Fore.LIGHTMAGENTA_EX}[>]{Style.RESET_ALL} Enter number of threads [eg. 3] > ")) proxies = gather_proxy() os.system('cls') UI.banner() print('\n\n') if user_thread: threads = [] if len(proxies) != 0: os.system('title Discord Generator ^| Proxy: True ^| Threading: True') for i in range(num_thread): t = threading.Thread(target=worker, args= (random.choice(proxies), )) threads.append(t) t.start() else: os.system('title Discord Generator ^| Proxy: False ^| Threading: True') for i in range(num_thread): t = threading.Thread(target=worker) threads.append(t) t.start() else: if len(proxies) != 0: os.system('title Discord Generator ^| Proxy: True ^| Threading: False') worker(random.choice(proxies)) else: os.system('title Discord Generator ^| Proxy: False ^| Threading: False') worker()
def menu(): proxies = gather_proxy() os.system('cls') if len(proxies) != 0: os.system('title Discord Generator ^| ^| PROXY LIST DETECTED') else: os.system('title Discord Generator ^| :') UI.banner() UI.start_menu() try: user_input = int( input(f"\t\t{Fore.LIGHTMAGENTA_EX}[?]{Style.RESET_ALL} > ")) print('\n\n') except ValueError: user_input = 0 if user_input == 1: os.system('cls') UI.banner() UI.menu2() try: user_input = int( input(f"\t\t{Fore.LIGHTMAGENTA_EX}[?]{Style.RESET_ALL} > ")) print('\n\n') except ValueError: user_input = 0 if user_input == 1: return 2 elif user_input == 2: return 1 else: return None
continue_program = False if continue_program: if user_thread: print( f"{Fore.LIGHTMAGENTA_EX}[WARNING]{Style.RESET_ALL} Do not put a lot of threads or you will crash. 2 threads is decent. (chrome windows)" ) num_thread = int( input( f"{Fore.LIGHTMAGENTA_EX}[>]{Style.RESET_ALL} Enter number of threads [eg. 3] > " )) proxies = gather_proxy() os.system('cls') UI.banner() print('\n\n') if user_thread: threads = [] if len(proxies) != 0: os.system( 'title Discord Generator ^| Proxy: True ^| Threading: True' ) for i in range(num_thread): t = threading.Thread(target=worker, args=(random.choice(proxies), )) threads.append(t)