'Parses the output given as a string by the wpscan tool and creates
the appropiate hosts, interface, service and vulnerabilites. Return
nothing.'

def parseOutputString(self, output, debug=False):

    self.parseOutputWpscan(output)
    wp_url = re.search('URL:    ((http[s]?)\\:\\/\\/([\\w\\.]+)[.\\S]+)', output)
    (service, base_url) = self.__get_service_and_url_from_output(output)
    port = self.getPort(wp_url.group(1), service)
    host_ip = socket.gethostbyname_ex(base_url)[2][0]
    host_id = self.createAndAddHost(host_ip)
    interface_id = self.createAndAddInterface(host_id, host_ip, ipv4_address=host_ip, hostname_resolution=base_url)
    service_id = self.createAndAddServiceToInterface(host_id, interface_id, service, 'tcp', ports=[port])
    potential_vulns = re.findall('(\\[\\!\\].*)', output)
    for potential_vuln in potential_vulns:
        (vuln_name, severity) = self.__get_name_and_severity(potential_vuln)
        if (vuln_name is not None):
            vuln = potential_vuln
            path = self.__get_path_from_vuln(vuln)
            self.createAndAddVulnWebToService(host_id, service_id, name=vuln_name, website=base_url, path=path, severity=severity)
    if (len(self.plugins) > 0):
        self.addThemesOrPluginsVulns('plugins.json', self.plugins, host_id, service_id, base_url, wp_url.group(1), 'plugins')
    if (len(self.wpversion) > 0):
        self.addWPVulns('wordpresses.json', self.wpversion, host_id, service_id, base_url)
    if (len(self.themes) > 0):
        self.addThemesOrPluginsVulns('themes.json', self.themes, host_id, service_id, base_url, wp_url.group(1), 'themes')
