'This method will discard the output the shell sends, it will read it
from the xml where it expects it to be present.
NOTE: if \'debug\' is true then it is being run from a test case and the
output being sent is valid.'

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

    if (not os.path.exists(self._output_path)):
        return False
    p = SkipfishParser(self._output_path)
    hostc = {}
    port = 80
    for issue in p.issues:
        req = ''
        res = ''
        for sample in issue['samples']:
            if (not (sample['url'] in hostc)):
                reg = re.search("(http|https|ftp)\\://([a-zA-Z0-9\\.\\-]+(\\:[a-zA-Z0-9\\.&amp;%\\$\\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|localhost|([a-zA-Z0-9\\-]+\\.)*[a-zA-Z0-9\\-]+\\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))[\\:]*([0-9]+)*([/]*($|[a-zA-Z0-9\\.\\,\\?'\\\\+&amp;%\\$#\\=~_\\-]+)).*?$", sample['url'])
                protocol = reg.group(1)
                host = reg.group(4)
                if (reg.group(11) is not None):
                    port = reg.group(11)
                else:
                    port = (443 if (protocol == 'https') else 80)
                ip = self.resolve(host)
                h_id = self.createAndAddHost(ip)
                i_id = self.createAndAddInterface(h_id, ip, ipv4_address=ip, hostname_resolution=host)
                s_id = self.createAndAddServiceToInterface(h_id, i_id, 'http', 'tcp', ports=[port], status='open')
                n_id = self.createAndAddNoteToService(h_id, s_id, 'website', '')
                self.createAndAddNoteToNote(h_id, s_id, n_id, host, '')
                hostc[sample['url']] = {'h_id': h_id, 'ip': ip, 'port': port, 'host': host, 'protocol': protocol, 'i_id': i_id, 's_id': s_id}
            try:
                req = open(('%s/request.dat' % sample['dir']), 'r').read()
            except:
                pass
            try:
                res = open(('%s/request.dat' % sample['dir']), 'r').read()
            except:
                pass
            d = hostc[sample['url']]
            self.createAndAddVulnWebToService(d['h_id'], d['s_id'], name=p.err_msg[str(issue['type'])], desc=('Extra:    ' + sample['extra']), website=d['host'], path=sample['url'], severity=issue['severity'])
