'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 = SslcheckParser(self._output_file_path)
    else:
        if (not os.path.exists(self._output_file_path)):
            return False
        parser = SslcheckParser(self._output_file_path)
        for host in parser.result:
            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, hostname_resolution=parser.hostinfo[host]['hostname'])
            else:
                i_id = self.createAndAddInterface(h_id, host, ipv6_address=host)
            s_id = self.createAndAddServiceToInterface(h_id, i_id, 'https', protocol='tcp', ports=int(parser.hostinfo[host]['port']))
            for carac in parser.result[host]:
                if ((carac == 'key') and (int(parser.result[host][carac]) < 2048)):
                    v_id = self.createAndAddVulnToService(h_id, s_id, 'Public    server    key    size', desc='Key    size    =    {}    bits    (2048    bits    recommended)'.format(parser.result[host][carac]), severity=2)
                    continue
                if ((carac == 'renegotiation') and (parser.result[host][carac] == 'no')):
                    v_id = self.createAndAddVulnToService(h_id, s_id, 'Secure    renegotiation', desc='Secure    renegotiation    disabled    (recommended:    enabled)', severity=1)
                    continue
                if ((carac == 'forward_secrecy') and (parser.result[host][carac] == 'no')):
                    v_id = self.createAndAddVulnToService(h_id, s_id, 'Forward    Secrecy', desc='Forward    secrecy    disabled    (recommended:    enabled)', severity=1)
                    continue
                if ((carac == 'heartbeat') and (parser.result[host][carac] == 'yes')):
                    v_id = self.createAndAddVulnToService(h_id, s_id, 'Heartbleed', desc='Heartbeat    enabled    (recommended:    disabled)', severity=4)
                    continue
                if ((carac == 'forward_secrecy') and (parser.result[host][carac] == 'no')):
                    v_id = self.createAndAddVulnToService(h_id, s_id, 'CRIME', desc='Potentially    vulnerable    to    CRIME    attack', severity=0)
                    continue
                if (parser.result[host][carac] == 'insecure'):
                    v_id = self.createAndAddVulnToService(h_id, s_id, 'Cipher    suite    {}'.format(carac), desc='{}    enabled    (recommended:    disabled)'.format(parser.result[host][carac]), severity=1)
                    continue
                if (parser.result[host][carac] == 'signature    insecure'):
                    v_id = self.createAndAddVulnToService(h_id, s_id, 'Certificate    signature    cipher    suite    {}'.format(parser.result[host][carac]), desc='{}    used    (recommended:    use    a    safer    one    as    sha256WithRSAEncryption)'.format(parser.result[host][carac]), severity=1)
                    continue
                if ((carac == 'SSLv3') and (parser.result[host][carac] == 'yes')):
                    v_id = self.createAndAddVulnToService(h_id, s_id, 'SSL3', desc='SSL3    enabled    (recommended:    disabled)\nSSL3    is    broken    and    should    not    be    used.', severity=2)
                    continue
                if ((carac == 'TLSv1') and (parser.result[host][carac] == 'yes')):
                    v_id = self.createAndAddVulnToService(h_id, s_id, 'TLSv1.0', desc='TLSv1.0    enabled    (recommended:    disabled,    and    to    use    TLSv1.1    or    TLSv1.2)', severity=1)
                    continue
                if (((carac == 'TLSv1.1') and (parser.result[host][carac] == 'no')) or ((carac == 'TLSv1.2') and (parser.result[host][carac] == 'no'))):
                    v_id = self.createAndAddVulnToService(h_id, s_id, parser.result[host][carac], desc='{}    disabled    (recommended:    enabled)'.format(parser.result[host][carac]), severity=1)
                    continue
    del parser
    return True
