cli/streamingphish/streamingphish/cli.py
def _run(self):
        """
        Handler and primary interface that solicits user for a desired action and then launches it.
        """
        while True:
            tqdm.tqdm.write(BANNER)
            tqdm.tqdm.write(MAIN_MENU)
            try:
                selection = int(input("Please make a selection [1-6]: "))
            except ValueError:
                tqdm.tqdm.write("Invalid selection - please select a number 1 through"
                                " 6 and press enter.")
                continue

            if selection == 1:
                try:
                    PhishPredictor()(mode='certstream')
                except IOError as error:
                    # Active classifier doesn't exist, error msg tells user to train one.
                    tqdm.tqdm.write("{}".format(error))
                    continue
            elif selection == 2:
                try:
                    PhishPredictor()(mode='manual')
                except IOError as error:
                    # Active classifier doesn't exist, error msg tells user to train one.
                    tqdm.tqdm.write("{}".format(error))
                    continue
            elif selection == 3:
                self._manage_classifiers()
            elif selection == 4:
                self._train_classifier()
            elif selection == 5:
                self._phish_config.print_config()
            elif selection == 6:
                tqdm.tqdm.write("[+] Exiting...")
                sys.exit(0)
            else:
                tqdm.tqdm.write("Invalid selection - please select a number between 1 and 6.")
                continue

        Handler and primary interface that solicits user for a desired action and then launches it.
        
Handler and primary interface that solicits user for a desired action and then launches it.
Handler and primary interface that solicits user for a desired action and then launches it .
def _run(self):
        while True:
            tqdm.tqdm.write(BANNER)
            tqdm.tqdm.write(MAIN_MENU)
            try:
                selection = int(input("Please make a selection [1-6]: "))
            except ValueError:
                tqdm.tqdm.write("Invalid selection - please select a number 1 through"
                                " 6 and press enter.")
                continue
            if selection == 1:
                try:
                    PhishPredictor()(mode='certstream')
                except IOError as error:
                    tqdm.tqdm.write("{}".format(error))
                    continue
            elif selection == 2:
                try:
                    PhishPredictor()(mode='manual')
                except IOError as error:
                    tqdm.tqdm.write("{}".format(error))
                    continue
            elif selection == 3:
                self._manage_classifiers()
            elif selection == 4:
                self._train_classifier()
            elif selection == 5:
                self._phish_config.print_config()
            elif selection == 6:
                tqdm.tqdm.write("[+] Exiting...")
                sys.exit(0)
            else:
                tqdm.tqdm.write("Invalid selection - please select a number between 1 and 6.")
                continue
def _run ( self ) : while True : tqdm . tqdm . write ( BANNER ) tqdm . tqdm . write ( MAIN_MENU ) try : selection = int ( input ( "Please make a selection [1-6]: " ) ) except ValueError : tqdm . tqdm . write ( "Invalid selection - please select a number 1 through" " 6 and press enter." ) continue if selection == 1 : try : PhishPredictor ( ) ( mode = 'certstream' ) except IOError as error : tqdm . tqdm . write ( "{}" . format ( error ) ) continue elif selection == 2 : try : PhishPredictor ( ) ( mode = 'manual' ) except IOError as error : tqdm . tqdm . write ( "{}" . format ( error ) ) continue elif selection == 3 : self . _manage_classifiers ( ) elif selection == 4 : self . _train_classifier ( ) elif selection == 5 : self . _phish_config . print_config ( ) elif selection == 6 : tqdm . tqdm . write ( "[+] Exiting..." ) sys . exit ( 0 ) else : tqdm . tqdm . write ( "Invalid selection - please select a number between 1 and 6." ) continue
Handler and primary interface that solicits user for a desired action and then launches it.
Handler and primary interface that solicits user for a desired action and then launches it .
"""
        Handler and primary interface that solicits user for a desired action and then launches it.
        """ # Active classifier doesn't exist, error msg tells user to train one. # Active classifier doesn't exist, error msg tells user to train one.
self