# Path: core/commands.py
# def get_commands(include=None, exclude=None):
#     commands = []
#     for n, f in getmembers(modules[__name__], isfunction):
#         if n in [c for c, _ in commands]:
#             continue
#         if hasattr(f, 'behavior'):
#             if f.__name__.startswith('_'):
#                 shortname = f.__name__.lstrip('_')
#                 n, f = shortname, getattr(modules[__name__], shortname)
#                 f.__name__ = shortname
#             if (include is None or n in include) and (exclude is None or n not in exclude):
#                 commands.append((n, f))
#     return commands


import atexit
import os
from copy import copy
from funcsigs import signature
from getpass import getuser
from multiprocessing import cpu_count, Pool
from signal import signal, SIGINT, SIG_IGN, SIGTERM
from six.moves import zip_longest
from socket import gethostname
from subprocess import check_output, Popen, PIPE
from sys import stdout
from termcolor import colored
from terminaltables import SingleTable
from types import MethodType
from core import *
from core.commands import get_commands
        colored(gethostname(), 'blue'),
        colored(':', 'cyan'),
        colored('rpl-attacks', 'red'),
        colored('>>', 'cyan'),
    ))
    welcome = "\nType help or ? to list commands.\n"

    def __init__(self, parallel):
        self.continuation_prompt = self.prompt
        self.parallel = parallel
        width, height = get_terminal_size() or MIN_TERM_SIZE
        if any(map((lambda s: s[0] < s[1]), zip((height, width), MIN_TERM_SIZE))):
            stdout.write("\x1b[8;{rows};{cols}t".format(rows=max(MIN_TERM_SIZE[0], height),
                                                        cols=max(MIN_TERM_SIZE[1], width)))
        if self.parallel:
            processes = cpu_count()
            self.__last_tasklist = None
            self.tasklist = {}
            self.pool = Pool(processes, lambda: signal(SIGINT, SIG_IGN))
        atexit.register(self.graceful_exit)
        self.reexec = ['status']
        self.__bind_commands()
        super(FrameworkConsole, self).__init__()
        self.do_loglevel('info')
        self.do_clear('')

    def __bind_commands(self):
        if not self.parallel:
            for attr in ['complete_kill', 'do_kill', 'do_status']:
                delattr(FrameworkConsole, attr)

# Path: core/commands.py
# def get_commands(include=None, exclude=None):
#     commands = []
#     for n, f in getmembers(modules[__name__], isfunction):
#         if n in [c for c, _ in commands]:
#             continue
#         if hasattr(f, 'behavior'):
#             if f.__name__.startswith('_'):
#                 shortname = f.__name__.lstrip('_')
#                 n, f = shortname, getattr(modules[__name__], shortname)
#                 f.__name__ = shortname
#             if (include is None or n in include) and (exclude is None or n not in exclude):
#                 commands.append((n, f))
#     return commands


# Path: core/console.py
import atexit
import os
from copy import copy
from funcsigs import signature
from getpass import getuser
from multiprocessing import cpu_count, Pool
from signal import signal, SIGINT, SIG_IGN, SIGTERM
from six.moves import zip_longest
from socket import gethostname
from subprocess import check_output, Popen, PIPE
from sys import stdout
from termcolor import colored
from terminaltables import SingleTable
from types import MethodType
from core import *
from core.commands import get_commands

        colored(gethostname(), 'blue'),
        colored(':', 'cyan'),
        colored('rpl-attacks', 'red'),
        colored('>>', 'cyan'),
    ))
    welcome = "\nType help or ? to list commands.\n"

    def __init__(self, parallel):
        self.continuation_prompt = self.prompt
        self.parallel = parallel
        width, height = get_terminal_size() or MIN_TERM_SIZE
        if any(map((lambda s: s[0] < s[1]), zip((height, width), MIN_TERM_SIZE))):
            stdout.write("\x1b[8;{rows};{cols}t".format(rows=max(MIN_TERM_SIZE[0], height),
                                                        cols=max(MIN_TERM_SIZE[1], width)))
        if self.parallel:
            processes = cpu_count()
            self.__last_tasklist = None
            self.tasklist = {}
            self.pool = Pool(processes, lambda: signal(SIGINT, SIG_IGN))
        atexit.register(self.graceful_exit)
        self.reexec = ['status']
        self.__bind_commands()
        super(FrameworkConsole, self).__init__()
        self.do_loglevel('info')
        self.do_clear('')

    def __bind_commands(self):
        if not self.parallel:
            for attr in ['complete_kill', 'do_kill', 'do_status']:
                delattr(FrameworkConsole, attr)

        for name, func in get_commands():