'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 self.ignore_parsing:
        return
    sys.path.append(self.getSetting('Sqlmap    path'))
    try:
        from lib.core.settings import HASHDB_MILESTONE_VALUE
        from lib.core.enums import HASHDB_KEYS
        from lib.core.settings import UNICODE_ENCODING
    except:
        self.log('Remember    set    your    Sqlmap    Path    Setting!...    Abort    plugin.', 'ERROR')
        return
    self.HASHDB_MILESTONE_VALUE = HASHDB_MILESTONE_VALUE
    self.HASHDB_KEYS = HASHDB_KEYS
    self.UNICODE_ENCODING = UNICODE_ENCODING
    password = self.getpassword(output)
    webserver = re.search('web    application    technology:    (.*?)\n', output)
    if webserver:
        webserver = webserver.group(1)
    users = self.getuser(output)
    dbs = self.getdbs(output)
    tables = self.gettables(output)
    columns = self.getcolumns(output)
    db = Database(self._output_path)
    db.connect()
    absFilePaths = self.hashDBRetrieve(self.HASHDB_KEYS.KB_ABS_FILE_PATHS, True, db)
    brute_tables = self.hashDBRetrieve(self.HASHDB_KEYS.KB_BRUTE_TABLES, True, db)
    brute_columns = self.hashDBRetrieve(self.HASHDB_KEYS.KB_BRUTE_COLUMNS, True, db)
    xpCmdshellAvailable = self.hashDBRetrieve(self.HASHDB_KEYS.KB_XP_CMDSHELL_AVAILABLE, True, db)
    dbms_version = self.hashDBRetrieve(self.HASHDB_KEYS.DBMS, False, db)
    self.ip = self.getAddress(self.hostname)
    h_id = self.createAndAddHost(self.ip)
    i_id = self.createAndAddInterface(h_id, name=self.ip, ipv4_address=self.ip, hostname_resolution=self.hostname)
    s_id = self.createAndAddServiceToInterface(h_id, i_id, self.protocol, 'tcp', [self.port], status='open', version=webserver)
    n_id = self.createAndAddNoteToService(h_id, s_id, 'website', '')
    self.createAndAddNoteToNote(h_id, s_id, n_id, self.hostname, '')
    for item in self.db_port.keys():
        if (dbms_version.find(item) >= 0):
            db_port = self.db_port[item]
    s_id2 = self.createAndAddServiceToInterface(h_id, i_id, name=dbms_version, protocol='tcp', status='down', version=str(dbms_version), ports=[str(db_port)], description='DB    detect    by    SQLi')
    if users:
        for v in users:
            if v:
                self.createAndAddCredToService(h_id, s_id2, v, '')
    if password:
        for (k, v) in password.iteritems():
            self.createAndAddCredToService(h_id, s_id2, k, v)
    if absFilePaths:
        self.createAndAddNoteToService(h_id, s_id2, 'sqlmap.absFilePaths', '\n'.join(absFilePaths))
    if brute_tables:
        for item in brute_tables:
            self.createAndAddNoteToService(h_id, s_id2, 'sqlmap.brutetables', item[1])
    if tables:
        table_names = ['{}.{}'.format(db_name, table) for (db_name, db_tables) in tables.items() for table in db_tables]
        self.createAndAddNoteToService(h_id, s_id2, 'sqlmap.tables', '\n'.join(table_names))
    if columns:
        for (database, tables) in columns.items():
            text = ''
            for (table_name, columns) in tables.items():
                columns_text = ',    '.join(('{}    {}'.format(col_name, type_) for (col_name, type_) in columns))
                text += '{}:    {}\n'.format(table_name, columns_text)
            self.createAndAddNoteToService(h_id, s_id2, ('sqlmap.columns.' + database), text)
    if brute_columns:
        text = (((('Db:    ' + brute_columns[0][0]) + '\nTable:    ') + brute_columns[0][1]) + '\nColumns:')
        for element in brute_columns:
            text += (str(element[2]) + '\n')
        self.createAndAddNoteToService(h_id, s_id2, 'sqlmap.brutecolumns', text)
    if xpCmdshellAvailable:
        self.createAndAddNoteToService(h_id, s_id2, 'sqlmap.xpCmdshellAvailable', str(xpCmdshellAvailable))
    if dbs:
        self.createAndAddNoteToService(h_id, s_id2, 'db.databases', '\n'.join(dbs))
    for inj in (self.hashDBRetrieve(self.HASHDB_KEYS.KB_INJECTIONS, True, db) or []):
        for (k, v) in inj.data.items():
            self.createAndAddVulnWebToService(h_id, s_id, name=inj.data[k]['title'], desc=((((('Payload:' + str(inj.data[k]['payload'])) + '\nVector:') + str(inj.data[k]['vector'])) + '\nParam    type:') + str(self.ptype[inj.ptype])), ref=[], pname=inj.parameter, severity='high', method=inj.place, params=self.params, **get_vulnweb_url_fields(self.fullpath))
