def extract_file_command(current_directory, arg):
     file = current_directory.get_file(arg)
     if file != None:
         terminal.show_progress(0.02, 100)
         extracted = file.extract(current_directory)
         current_directory.files.append(extracted)
         print(file.name, "successfully extracted")
     else:
         print("file does not exist:", arg)
 def download_file_command(current_directory, zip_file, arg):
     print("verifying url...")
     terminal.show_progress(0.001, 100)
     if arg.strip() in [
             '178.345.235.23/tools.zip', 'http://178.345.235.23/tools.zip',
             'https://178.345.235.23/tools.zip',
             'ftp://178.345.235.23/tools.zip'
     ]:
         print("downloading file...")
         terminal.show_progress(0.08, 100)
         current_directory.files.append(zip_file)
         print(zip_file.name, "successfully downloaded from remote server")
     else:
         print("invalid url:", arg)
Ejemplo n.º 3
0
            print("Invalid group Number.")

    SOLUTIONS = Solutions(group)
    terminal.clear_terminal()

    # Show head text (SERVER LOGIN)
    head_text = open_file_and_get_content('assets/head.txt')
    print(terminal.bold_green_text(head_text))

    # Login password guard block
    while True:
        x = input(terminal.bold_yellow_text(f"Enter {IP} password: "******"Verifing password...")
        if x == SOLUTIONS.server_login_password:
            terminal.show_progress(0.01, 100)
            print(terminal.green_text("\nLogging in..."))

            terminal.show_progress(0.08, 100)

            lines = open_file_and_get_content('assets/login.txt').split('\n')
            for i, line in enumerate(lines):
                if i % 50 == 0:
                    time.sleep(0.05)
                print(line.strip())
                if i % 432 == 0:
                    terminal.show_progress(0.009, random.randint(1, 75))
            terminal.show_progress(0.005, random.randint(1, 75))
            terminal.clear_terminal()
            time.sleep(2.0)
            break