'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 debug:
        parser = WcscanParser(self._output_file_path)
    else:
        if (not os.path.exists(self._output_file_path)):
            return False
        parser = WcscanParser(self._output_file_path)
        for file in parser.scaninfo:
            host = parser.scaninfo[file]['host']
            port = parser.scaninfo[file]['port']
            h_id = self.createAndAddHost(host)
            if re.match('(^[2][0-5][0-5]|^[1]{0,1}[0-9]{1,2})\\.([0-2][0-5][0-5]|[1]{0,1}[0-9]{1,2})\\.([0-2][0-5][0-5]|[1]{0,1}[0-9]{1,2})\\.([0-2][0-5][0-5]|[1]{0,1}[0-9]{1,2})$', host):
                i_id = self.createAndAddInterface(h_id, host, ipv4_address=host)
            else:
                i_id = self.createAndAddInterface(h_id, host, ipv6_address=host)
            s_id = self.createAndAddServiceToInterface(h_id, i_id, 'http', protocol='tcp', ports=port)
            for vuln in parser.result[file]:
                if (parser.scaninfo[file]['type'] == 'phpini'):
                    v_id = self.createAndAddVulnToService(h_id, s_id, ((parser.scaninfo[file]['file'] + ':') + vuln), desc='{}    :    {}\n{}'.format(vuln, str(parser.result[file][vuln][0]), str(parser.result[file][vuln][1])), severity=0)
                if (parser.scaninfo[file]['type'] == 'webconfig'):
                    v_id = self.createAndAddVulnToService(h_id, s_id, ((parser.scaninfo[file]['file'] + ':') + str(parser.result[file][vuln][3])), desc='{}    :    {}    =    {}\n{}'.format(str(parser.result[file][vuln][3]), str(parser.result[file][vuln][2]), str(parser.result[file][vuln][0]), str(parser.result[file][vuln][1])), severity=0)
    del parser
    return True
