'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):

    parser = HydraParser(output)
    i = 0
    hosts = {}
    service = ''
    port = ''
    for item in parser.items:
        service = item['plugin']
        port = item['port']
        if (hosts.has_key(item['ip']) == False):
            hosts[item['ip']] = []
        hosts[item['ip']].append([item['login'], item['password']])
    for (k, v) in hosts.iteritems():
        h_id = self.createAndAddHost(k)
        if self._isIPV4(k):
            i_id = self.createAndAddInterface(h_id, k, ipv4_address=k)
        else:
            i_id = self.createAndAddInterface(h_id, k, ipv6_address=k)
        s_id = self.createAndAddServiceToInterface(h_id, i_id, service, ports=[port], protocol='tcp', status='open')
        for cred in v:
            self.createAndAddCredToService(h_id, s_id, cred[0], cred[1])
            self.createAndAddVulnToService(h_id, s_id, 'Weak    Credentials', ('[hydra    found    the    following    credentials]\nuser:%s\npass:%s' % (cred[0], cred[1])), severity='high')
    del parser
