Пример #1
0
def menu():
    """Driver for the session management menu
    """
    while True:
        stream.dump_sessions()
        choice = util.print_menu(session_menu)

        if choice == 0:
            break
        elif choice == 1:
            (module, number) = stream.get_session_input()
            if not module is None:
                stream.stop_session(module, number)
        elif choice == 2:
            (module, number) = stream.get_session_input()
            if not module is None:
                stream.view_session(module, number)
        elif choice == 3:
            try:
                display = color.B_YELLOW + '[' + color.B_GREEN + '!' + color.B_YELLOW + \
                          '] Enter file to log to' + color.B_WHITE + ' > ' + color.END
                file_path = raw_input(display)
                if file_path is None:
                    return
                if util.does_file_exist(file_path) or path.islink(file_path):
                    util.Error('File already exists.')
                    return
                (module, number) = stream.get_session_input()
                if not module is None:
                    display = color.B_YELLOW + '[' + color.B_GREEN + '!' + color.B_YELLOW + \
                              '] Log output from %s session %s to %s. Is this correct? '  + \
                              color.B_GREEN + '[' + color.B_YELLOW + 'Y' + color.B_GREEN + \
                              '/' + color.B_YELLOW + 'n' + color.B_GREEN + '] ' + \
                              color.B_WHITE + '> ' + color.END
                    tmp = raw_input(display % (module, number, file_path))
                    if 'n' in tmp.lower():
                        return
                    stream.toggle_log(module, number, file_path, True)
            except KeyboardInterrupt:
                return
            except Exception:
                util.Error('Error logging to given file')
                return
        elif choice == 4:
            (module, number) = stream.get_session_input()
            if not module is None:
                stream.toggle_log(module, number)
        elif choice == -1:
            pass
        else:
            system('clear')
Пример #2
0
def menu():
    """Driver for the session management menu
    """
    while True:
        stream.dump_sessions()
        choice = util.print_menu(session_menu)

        if choice == 0:
            break
        elif choice == 1:
            (module, number) = stream.get_session_input()
            if not module is None:
                stream.stop_session(module, number)
        elif choice == 2:
            (module, number) = stream.get_session_input()
            if not module is None:
                stream.view_session(module, number)
        elif choice == 3:
            try:
                display = color.B_YELLOW + '[' + color.B_GREEN + '!' + color.B_YELLOW + \
                          '] Enter file to log to' + color.B_WHITE + ' > ' + color.END
                file_path = raw_input(display)
                if file_path is None:
                    return
                if util.does_file_exist(file_path) or path.islink(file_path):
                    util.Error('File already exists.')
                    return
                (module, number) = stream.get_session_input()
                if not module is None:
                    display = color.B_YELLOW + '[' + color.B_GREEN + '!' + color.B_YELLOW + \
                              '] Log output from %s session %s to %s. Is this correct? '  + \
                              color.B_GREEN + '[' + color.B_YELLOW + 'Y' + color.B_GREEN + \
                              '/' + color.B_YELLOW + 'n' + color.B_GREEN + '] ' + \
                              color.B_WHITE + '> ' + color.END
                    tmp = raw_input(display % (module, number, file_path))
                    if 'n' in tmp.lower():
                        return
                    stream.toggle_log(module, number, file_path, True)
            except KeyboardInterrupt:
                return
            except Exception:
                util.Error('Error logging to given file')
                return
        elif choice == 4:
            (module, number) = stream.get_session_input()
            if not module is None:
                stream.toggle_log(module, number)
        elif choice == -1:
            pass
        else:
            system('clear')
Пример #3
0
def menu():
	while True:
		stream.dump_sessions()
		choice = util.print_menu(session_menu)

		if choice == 0:
			break
		elif choice == 1:
			module, number = get_session_input()
			if not module is None:
				stream.stop_session(string.lower(module), int(number))
			else:
				return
		elif choice == 2:
		  	module, number = get_session_input()
		  	if not module is None:
				stream.view_session(string.lower(module), int(number))
			else:
				return
		elif choice == 3:
			print '[!] Enter file to log to: '
			file_path = raw_input('> ')
			if file_path is None:
				return
			if util.does_file_exist(file_path):
				util.Error('File already exists.')
				return
			util.Msg('Module must be a sniffer or valid logging module.')
			module = None
			(module, number) = get_session_input()
			try:
				if not module is None:
					tmp = raw_input('[!] Log output from %s session %s to %s.  Is this correct? '%
																	(module,number,file_path))
				else:
					return
			except Exception, j:
				util.Error('Error logging to given file')
				return
			if tmp == 'n':
				return
			stream.start_log_session(module, int(number), file_path)
		elif choice == 4:
			(module, number) = get_session_input()
			if not module is None:
				stream.stop_log_session(module, int(number))
Пример #4
0
def menu():
    """Driver for the session management menu
    """
    while True:
        stream.dump_sessions()
        choice = util.print_menu(session_menu)

        if choice == 0:
            break
        elif choice == 1:
            (module, number) = stream.get_session_input()
            if not module is None:
                stream.stop_session(module, number)
        elif choice == 2:
            (module, number) = stream.get_session_input()
            if not module is None:
                stream.view_session(module, number)
        elif choice == 3:
            print '[!] Enter file to log to: '
            file_path = raw_input('> ')
            if file_path is None:
                return
            if util.does_file_exist(file_path) or path.islink(file_path):
                util.Error('File already exists.')
                return
            util.Msg('Module must be a sniffer or valid logging module.')
            (module, number) = stream.get_session_input()
            try:
                if not module is None:
                    tmp = raw_input('[!] Log output from %s session %s to %s.'
                        'Is this correct? [Y/n]' % (module, number, file_path))
                    if 'n' in tmp.lower():
                        return
                    stream.toggle_log(module, number, file_path, True)
            except Exception:
                util.Error('Error logging to given file')
                return
        elif choice == 4:
            (module, number) = stream.get_session_input()
            if not module is None:
                stream.toggle_log(module, number)
        elif choice == -1:
            pass
        else:
            system('clear')
Пример #5
0
def main():
    """ Zarp entry point
    """

    # set up configuration
    config.initialize()

    # set up database
    database.initialize()

    # load modules
    loader = LoadedModules()
    loader.load()
    Msg('Loaded %d modules.' % loader.total)

    # handle command line options first
    if len(argv) > 1:
        parse_cmd.parse(argv, loader)

    # menus
    main_menu = ['Poisoners', 'DoS Attacks', 'Sniffers', 'Scanners',
                     'Parameter', 'Services', 'Attacks', 'Sessions']

    running = True
    choice = -1
    while running:
        header()
        choice = print_menu(main_menu)
        if choice == 0:
            # check if they've got running sessions!
            cnt = stream.get_session_count()
            if cnt > 0:
                choice = raw_input(color.YELLOW +
                'You have %d sessions running.  Are you sure? [Y/n] ' % cnt
                 + color.END)
                if 'y' in choice.lower() or choice == '':
                    Msg('Shutting all sessions down...')
                    stream.stop_session('all', -1)
                    running = False
            else:
                debug("Exiting with session count: %d" % (cnt))
                Msg("Exiting...")
                running = False
        elif choice == 1:
            while True:
                choice = print_menu([x().which for x in loader.poison])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.poison):
                    continue
                else:
                    stream.initialize(loader.poison[choice - 1])
        elif choice == 2:
            while True:
                choice = print_menu([x().which for x in loader.dos])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.dos):
                    continue
                else:
                    stream.initialize(loader.dos[choice - 1])
        elif choice == 3:
            while True:
                choice = print_menu([x().which for x in loader.sniffers])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.sniffers):
                    continue
                else:
                    stream.initialize(loader.sniffers[choice - 1])
        elif choice == 4:
            while True:
                choice = print_menu([x().which for x in loader.scanner])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.scanner):
                    continue
                else:
                    stream.initialize(loader.scanner[choice - 1])
        elif choice == 5:
            while True:
                choice = print_menu([x().which for x in loader.parameter])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.parameter):
                    continue
                else:
                    stream.initialize(loader.parameter[choice - 1])
        elif choice == 6:
            while True:
                choice = print_menu([x().which for x in loader.services])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.services):
                    continue
                else:
                    stream.initialize(loader.services[choice - 1])
        elif choice == 7:
            while True:
                choice = print_menu([x().which for x in loader.attacks])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.attacks):
                    continue
                else:
                    stream.initialize(loader.attacks[choice - 1])
        elif choice == 8:
            session_manager.menu()
        elif choice == -1:
            pass
Пример #6
0
def main():
    """ Zarp entry point
	"""

    # handle command line options first
    if len(sys.argv) > 1:
        parse_cmd.parse(sys.argv)

    # set up configuration
    config.initialize()

    # menus
    main_menu = [
        'Poisoners', 'DoS Attacks', 'Sniffers', 'Scanners', 'Parameter',
        'Services', 'Sessions'
    ]

    # load modules
    loader = LoadedModules()
    loader.load()
    Msg('Loaded %d modules.' % loader.total)

    running = True
    choice = -1
    while running:
        header()
        choice = print_menu(main_menu)
        if choice == 0:
            # check if they've got running sessions!
            cnt = stream.get_session_count()
            if cnt > 0:
                Msg('You have %d sessions running.  Are you sure?' % cnt)
                choice = raw_input('> ')
                if 'y' in choice.lower():
                    Msg('Shutting all sessions down...')
                    stream.stop_session('all', -1)
                    running = False
            else:
                debug("Exiting with session count: %d" % (cnt))
                Msg("Exiting...")
                running = False
        elif choice == 1:
            while True:
                choice = print_menu([x().which for x in loader.poison])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.poison):
                    continue
                else:
                    stream.initialize(loader.poison[choice - 1], 'POISON')
        elif choice == 2:
            while True:
                choice = print_menu([x().which for x in loader.dos])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.dos):
                    continue
                else:
                    stream.initialize(loader.dos[choice - 1], 'DOS')
        elif choice == 3:
            while True:
                choice = print_menu([x().which for x in loader.sniffers])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.sniffers):
                    continue
                else:
                    stream.initialize(loader.sniffers[choice - 1], 'SNIFFER')
        elif choice == 4:
            while True:
                choice = print_menu([x().which for x in loader.scanner])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.scanner):
                    continue
                else:
                    stream.initialize(loader.scanner[choice - 1], 'SCANNER')
        elif choice == 5:
            while True:
                choice = print_menu([x().which for x in loader.parameter])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.parameter):
                    continue
                else:
                    stream.initialize(loader.parameter[choice - 1],
                                      'PARAMETER')
        elif choice == 6:
            while True:
                choice = print_menu([x().which for x in loader.services])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.services):
                    continue
                else:
                    stream.initialize(loader.services[choice - 1], 'SERVICE')
        elif choice == 7:
            session_manager.menu()
        elif choice == -1:
            pass
Пример #7
0
def main():
    """ Zarp entry point
    """

    # set up configuration
    config.initialize()

    # set up database
    database.initialize()

    # load modules
    loader = LoadedModules()
    loader.load()
    Msg("Loaded %d modules." % loader.total)

    # handle command line options first
    if len(argv) > 1:
        parse_cmd.parse(argv, loader)

    # menus
    main_menu = ["Poisoners", "DoS Attacks", "Sniffers", "Scanners", "Parameter", "Services", "Attacks", "Sessions"]

    running = True
    choice = -1
    while running:
        header()
        choice = print_menu(main_menu)
        if choice == 0:
            # check if they've got running sessions!
            cnt = stream.get_session_count()
            if cnt > 0:
                choice = raw_input(
                    color.YELLOW + "You have %d sessions running.  Are you sure? [Y/n] " % cnt + color.END
                )
                if "y" in choice.lower() or choice == "":
                    Msg("Shutting all sessions down...")
                    stream.stop_session("all", -1)
                    running = False

                    # recheck that all sessions are down
                    cnt = stream.get_session_count()
                    if cnt <= 0:
                        # some libs dont clean up their own threads, so
                        # we need to hard quit those to avoid hanging; FIXME
                        _exit(1)
            else:
                debug("Exiting with session count: %d" % (cnt))
                Msg("Exiting...")
                running = False
        elif choice == 1:
            while True:
                choice = print_menu([x().which for x in loader.poison])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.poison):
                    continue
                else:
                    stream.initialize(loader.poison[choice - 1])
        elif choice == 2:
            while True:
                choice = print_menu([x().which for x in loader.dos])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.dos):
                    continue
                else:
                    stream.initialize(loader.dos[choice - 1])
        elif choice == 3:
            while True:
                choice = print_menu([x().which for x in loader.sniffers])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.sniffers):
                    continue
                else:
                    stream.initialize(loader.sniffers[choice - 1])
        elif choice == 4:
            while True:
                choice = print_menu([x().which for x in loader.scanner])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.scanner):
                    continue
                else:
                    stream.initialize(loader.scanner[choice - 1])
        elif choice == 5:
            while True:
                choice = print_menu([x().which for x in loader.parameter])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.parameter):
                    continue
                else:
                    stream.initialize(loader.parameter[choice - 1])
        elif choice == 6:
            while True:
                choice = print_menu([x().which for x in loader.services])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.services):
                    continue
                else:
                    stream.initialize(loader.services[choice - 1])
        elif choice == 7:
            while True:
                choice = print_menu([x().which for x in loader.attacks])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.attacks):
                    continue
                else:
                    stream.initialize(loader.attacks[choice - 1])
        elif choice == 8:
            session_manager.menu()
        elif choice == -1:
            pass
Пример #8
0
def main():
    """ Zarp entry point
    """

    # set up configuration
    config.initialize()

    # set up database
    database.initialize()

    # load modules
    loader = LoadedModules()
    loader.load()
    util.Msg('Loaded %d modules.' % loader.total)

    # handle command line options first
    if len(argv) > 1:
        parse_cmd.parse(argv, loader)

    # menus
    main_menu = [
        'Poisoners', 'DoS Attacks', 'Sniffers', 'Scanners', 'Parameter',
        'Services', 'Attacks', 'Sessions'
    ]

    running = True
    choice = -1
    while running:
        util.header()
        choice = util.print_menu(main_menu)
        if choice == 0:
            # check if they've got running sessions!
            cnt = stream.get_session_count()
            if cnt > 0:
                display = color.B_YELLOW + 'You have %d sessions running. ' + \
                          'Are you sure? ' + color.B_GREEN + '[' + color.B_YELLOW + \
                          'Y' + color.B_GREEN + '/' + color.B_YELLOW + 'n' + \
                          color.B_GREEN + '] ' + color.END
                choice = raw_input(display % cnt)
                if 'y' in choice.lower() or choice == '':
                    util.Msg('Shutting all sessions down...')
                    stream.stop_session('all', -1)
                    running = False

            else:
                util.debug("Exiting with session count: %d" % (cnt))
                util.Msg("Exiting...")
                running = False

            # remove zarp temporary directory
            util.init_app('rm -fr /tmp/.zarp/')

            # recheck that all sessions are down
            cnt = stream.get_session_count()
            if cnt <= 0:
                # some libs dont clean up their own threads, so
                # we need to hard quit those to avoid hanging; FIXME
                _exit(1)
        elif choice == 1:
            while True:
                choice = util.print_menu([x().which for x in loader.poison])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.poison):
                    continue
                else:
                    stream.initialize(loader.poison[choice - 1])
        elif choice == 2:
            while True:
                choice = util.print_menu([x().which for x in loader.dos])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.dos):
                    continue
                else:
                    stream.initialize(loader.dos[choice - 1])
        elif choice == 3:
            while True:
                choice = util.print_menu([x().which for x in loader.sniffers])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.sniffers):
                    continue
                else:
                    stream.initialize(loader.sniffers[choice - 1])
        elif choice == 4:
            while True:
                choice = util.print_menu([x().which for x in loader.scanner])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.scanner):
                    continue
                else:
                    stream.initialize(loader.scanner[choice - 1])
        elif choice == 5:
            while True:
                choice = util.print_menu([x().which for x in loader.parameter])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.parameter):
                    continue
                else:
                    stream.initialize(loader.parameter[choice - 1])
        elif choice == 6:
            while True:
                choice = util.print_menu([x().which for x in loader.services])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.services):
                    continue
                else:
                    stream.initialize(loader.services[choice - 1])
        elif choice == 7:
            while True:
                choice = util.print_menu([x().which for x in loader.attacks])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.attacks):
                    continue
                else:
                    stream.initialize(loader.attacks[choice - 1])
        elif choice == 8:
            session_manager.menu()
        elif choice == -1:
            pass
Пример #9
0
def main():
	# handle command line options first
	if len(sys.argv) > 1:
		parse_cmd.parse(sys.argv)
	
	# set up configuration 
	config.initialize()

	# menus
	main_menu =    [ 'Poisoners', 'DoS Attacks', 'Sniffers', 'Scanners',
				     'Parameter','Services','Sessions']
	poison_menu =  [ 'ARP Poison', 'DNS Poison', 'DHCP Poison', 'NBNS Spoof']
	dos_menu =     [ 'NDP', 'Nestea', 'LAND', 'TCP SYN', 'SMB2',
					'DHCP Starve'
				   ]
	sniffer_menu = [ 'HTTP Sniffer', 'Password Sniffer', 'Traffic Sniffer']
	service_menu = [ 'HTTP Server', 'SSH Server', 'FTP Server', 'SMB Listener', 'Access Point' ]
	scanner_menu = [ 'NetMap', 'Service Scan', 'AP Scan']
	parameter_menu = [ 'WEP Crack', 'WPA2 Crack', 'WPS Crack', 'Router Pwn', 'Pass-The-Hash' ]
	
	running = True
	choice = -1
	while running:
		header()
		choice = print_menu(main_menu)		
		if choice == 0:
			# check if they've got running sessions! 
			cnt = stream.get_session_count()
			if cnt > 0:
				Msg('You have %d sessions running.  Are you sure?'%cnt)
				choice = raw_input('> ')
				if 'y' in choice.lower(): 
					stream.stop_session('all', -1)
					running = False	
			else:
				debug("Exiting with session count: %d"%(cnt))
				Msg("Exiting...")
				running = False
		elif choice == 1:
			while True:
				choice = print_menu(poison_menu)
				if choice == 0:
					break
				elif choice == 1:
					stream.initialize('arp')
				elif choice == 2:
					stream.initialize('dns')
				elif choice == 3:
					stream.initialize('dhcp')
				elif choice == 4:
					stream.initialize('nbns')
				elif choice == -1:
					pass
		elif choice == 2:
			while True:
				choice = print_menu(dos_menu)
				if choice == 1:
					stream.initialize('ndp')
				elif choice == 2:
					stream.initialize('nestea')
				elif choice == 3:
					stream.initialize('land')
				elif choice == 4:
					stream.initialize('tcp_syn')
				elif choice == 5:
					stream.initialize('smb2')
				elif choice == 6:
					stream.initialize('dhcp_starv')
				elif choice == 0:
					break
				elif choice == -1:
					pass
				else:
					os.system('clear')
		elif choice == 3:
			while True:
				choice = print_menu(sniffer_menu)
				if choice == 0:
					break
				elif choice == 1:
					stream.initialize('http_sniffer')
				elif choice == 2:
					stream.initialize('password_sniffer')
				elif choice == 3:
					stream.initialize('traffic_sniffer')
				elif choice == -1:
					pass
		elif choice == 4:
			while True:
				choice = print_menu(scanner_menu)
				if choice == 0:
					break
				elif choice == 1:
					stream.initialize('net_map')
				elif choice == 2:
					stream.initialize('service_scan')
				elif choice == 3:
					stream.initialize('ap_scan')
				elif choice == -1:
					pass
		elif choice == 5:
			while True:
				choice = print_menu(parameter_menu)
				if choice == 0:
					break
				elif choice == 1:
					stream.initialize('wep_crack')	
				elif choice == 2:
					stream.initialize('wpa_crack')	
				elif choice == 3:
					stream.initialize('wps_crack')
				elif choice == 4:
					stream.initialize('router_pwn')	
				elif choice == 5:
					util.Error('Module not yet implemented')
					#stream.initialize('pass_the_hash')
				elif choice == -1:
					pass
		elif choice == 6:
			while True:
				choice = print_menu(service_menu)
				if choice == 0:
					break
				elif choice == 1:
					stream.initialize('http_server')
				elif choice == 2:
					stream.initialize('ssh_server')
				elif choice == 3:
					stream.initialize('ftp_server')
				elif choice == 4:
					stream.initialize('smb')
				elif choice == 5:
					stream.initialize('access_point')
				elif choice == -1:
					pass
		elif choice == 7:
			session_manager.menu()
		elif choice == -1:
			pass
Пример #10
0
def main():
    """ Zarp entry point
    """

    # set up configuration
    config.initialize()

    # set up database
    database.initialize()

    # load modules
    loader = LoadedModules()
    loader.load()
    util.Msg('Loaded %d modules.' % loader.total)

    # handle command line options first
    if len(argv) > 1:
        parse_cmd.parse(argv, loader)

    # menus
    main_menu = ['Poisoners', 'DoS Attacks', 'Sniffers', 'Scanners',
                     'Parameter', 'Services', 'Attacks', 'Sessions']

    running = True
    choice = -1
    while running:
        util.header()
        choice = util.print_menu(main_menu)
        if choice == 0:
            # check if they've got running sessions!
            cnt = stream.get_session_count()
            if cnt > 0:
                display = color.B_YELLOW + 'You have %d sessions running. ' + \
                          'Are you sure? ' + color.B_GREEN + '[' + color.B_YELLOW + \
                          'Y' + color.B_GREEN + '/' + color.B_YELLOW + 'n' + \
                          color.B_GREEN + '] ' + color.END
                choice = raw_input(display % cnt)
                if 'y' in choice.lower() or choice == '':
                    util.Msg('Shutting all sessions down...')
                    stream.stop_session('all', -1)
                    running = False

            else:
                util.debug("Exiting with session count: %d" % (cnt))
                util.Msg("Exiting...")
                running = False

            # remove zarp temporary directory
            util.init_app('rm -fr /tmp/.zarp/')
             
            # recheck that all sessions are down
            cnt = stream.get_session_count()
            if cnt <= 0:
               # some libs dont clean up their own threads, so
               # we need to hard quit those to avoid hanging; FIXME
               _exit(1)
        elif choice == 1:
            while True:
                choice = util.print_menu([x().which for x in loader.poison])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.poison):
                    continue
                else:
                    stream.initialize(loader.poison[choice - 1])
        elif choice == 2:
            while True:
                choice = util.print_menu([x().which for x in loader.dos])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.dos):
                    continue
                else:
                    stream.initialize(loader.dos[choice - 1])
        elif choice == 3:
            while True:
                choice = util.print_menu([x().which for x in loader.sniffers])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.sniffers):
                    continue
                else:
                    stream.initialize(loader.sniffers[choice - 1])
        elif choice == 4:
            while True:
                choice = util.print_menu([x().which for x in loader.scanner])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.scanner):
                    continue
                else:
                    stream.initialize(loader.scanner[choice - 1])
        elif choice == 5:
            while True:
                choice = util.print_menu([x().which for x in loader.parameter])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.parameter):
                    continue
                else:
                    stream.initialize(loader.parameter[choice - 1])
        elif choice == 6:
            while True:
                choice = util.print_menu([x().which for x in loader.services])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.services):
                    continue
                else:
                    stream.initialize(loader.services[choice - 1])
        elif choice == 7:
            while True:
                choice = util.print_menu([x().which for x in loader.attacks])
                if choice == 0:
                    break
                elif choice == -1:
                    pass
                elif choice > len(loader.attacks):
                    continue
                else:
                    stream.initialize(loader.attacks[choice - 1])
        elif choice == 8:
            session_manager.menu()
        elif choice == -1:
            pass