'Show the available shells and interact with them.'

def _cmd_interact(self, parameters):

    if (len(parameters) not in (0, 1)):
        self._cmd_help(['interact'])
        return
    if (len(parameters) == 0):
        om.out.console('No    shell    objects    available;    please    use    the    exploit    plugins    to    create    them.')
        self._show()
        return
    try:
        self._selected_shell = int(parameters[0])
    except ValueError:
        self._cmd_help(['interact'])
        return
    if (not len(self._exploit_results)):
        msg = 'No    shells    available.'
        om.out.error(msg)
        return
    if (self._selected_shell not in range(len(self._exploit_results))):
        msg = 'Please    select    a    shell    in    range    [0-%s].'
        srange = (len(self._exploit_results) - 1)
        om.out.error((msg % srange))
        return
    if (not isinstance(self._exploit_results[self._selected_shell], Shell)):
        msg = 'You    can    only    interact    with    shell    objects.    To    interact    with    proxy    objects,    please    use    your    browser.'
        om.out.error(msg)
        return
    prompt = self._exploit_results[self._selected_shell].get_name()
    msg = 'Execute    "exit"    to    get    out    of    the    remote    shell.    Commands    typed    in    this    menu    will    be    run    through    the    %s    shell.'
    om.out.console((msg % prompt))
    prompt = ((prompt + '-') + str(self._selected_shell))
    return callbackMenu(prompt, self._console, self._w3af, self, self._callback)
