'Exploits a vuln. using a single plugin.'

def _exploit(self, plugin_name, params, show_list=True):

    if (len(params) == 1):
        try:
            vuln_to_exploit = params[0]
            if (vuln_to_exploit != '*'):
                vuln_to_exploit = int(params[0])
        except:
            raise BaseFrameworkException('You    specified    an    invalid    vulnerability    id.')
    else:
        vuln_to_exploit = None
    if (plugin_name not in self._configs):
        raise BaseFrameworkException('Unknown    plugin.    Use    the    list    command    to    view    available    plugins.')
    self._plugin = plugin = self._w3af.plugins.get_plugin_inst('attack', plugin_name)
    try:
        response = plugin.can_exploit(vuln_to_exploit)
    except BaseFrameworkException as e:
        raise e
    else:
        if (not response):
            msg = 'No    exploitable    vulnerabilities    found.'
            raise BaseFrameworkException(msg)
        else:
            try:
                exploit_result = plugin.exploit(vuln_to_exploit)
            except NoVulnerabilityFoundException:
                raise
            except ExploitFailedException:
                raise
            else:
                if (not exploit_result):
                    msg = 'Failed    to    exploit    vulnerability.'
                    raise BaseFrameworkException(msg)
                else:
                    for i in range(len(self._exploit_results), len(exploit_result)):
                        exploit_result[i].set_exploit_result_id(i)
                    self._exploit_results.extend(exploit_result)
                    om.out.console('Vulnerability    successfully    exploited.    ', new_line=(not show_list))
                    if show_list:
                        self._show()
                        om.out.console('Please    use    the    interact    command    to    interact    with    the    shell    objects.')
