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

    try:
        f = urllib2.urlopen(((self.getSetting('Host') + '/api/hooks?token=') + self.getSetting('Authkey')))
        data = json.loads(f.read())
    except:
        api.devlog('[BeEF]    -    Connection    with    api')
        return
    if ('hooked-browsers' in data):
        for t in ['online', 'offlne']:
            for h in data['hooked-browsers'][t]:
                name = str(data['hooked-browsers'][t][h]['name'])
                version = str(data['hooked-browsers'][t][h]['version'])
                os = str(data['hooked-browsers'][t][h]['os'])
                platform = str(data['hooked-browsers'][t][h]['platform'])
                session = str(data['hooked-browsers'][t][h]['session'])
                ip = str(data['hooked-browsers'][t][h]['ip'])
                domain = str(data['hooked-browsers'][t][h]['domain'])
                port = str(data['hooked-browsers'][t][h]['port'])
                page_uri = str(data['hooked-browsers'][t][h]['page_uri'])
                desc = (((('Client    ip:' + ip) + '    has    been    injected    with    BeEF    using    the    url:') + page_uri) + '\n')
                desc += 'More    information:'
                desc += ('\ntype:' + t)
                desc += ('\nname:' + name)
                desc += ('\nversion:' + version)
                desc += ('\nos:' + os)
                desc += ('\nplatform:' + platform)
                desc += ('\nsession:' + session)
                desc += ('\nip:' + ip)
                desc += ('\ndomain:' + domain)
                desc += ('\nport:' + port)
                desc += ('\npage_uri:' + page_uri)
                h_id = self.createAndAddHost(ip)
                v_id = self.createAndAddVulnToHost(h_id, ((('BeEF    injected    ' + t) + '    session:') + session), desc=desc, ref=['http://http://beefproject.com/'], severity=3)
