(banner)
This function calls a class to extract information from the given
    DBMS banner based upon the data in XML file
This function calls a class to extract information from the given
    DBMS banner based upon the data in XML file
This function calls a class to extract information from the given DBMS banner based upon the data in XML file
def bannerParser(banner):
    """
    This function calls a class to extract information from the given
    DBMS banner based upon the data in XML file
    """

    xmlfile = None

    if Backend.isDbms(DBMS.MSSQL):
        xmlfile = paths.MSSQL_XML
    elif Backend.isDbms(DBMS.MYSQL):
        xmlfile = paths.MYSQL_XML
    elif Backend.isDbms(DBMS.ORACLE):
        xmlfile = paths.ORACLE_XML
    elif Backend.isDbms(DBMS.PGSQL):
        xmlfile = paths.PGSQL_XML

    if not xmlfile:
        return

    if Backend.isDbms(DBMS.MSSQL):
        handler = MSSQLBannerHandler(banner, kb.bannerFp)
        parseXmlFile(xmlfile, handler)

        handler = FingerprintHandler(banner, kb.bannerFp)
        parseXmlFile(paths.GENERIC_XML, handler)
    else:
        handler = FingerprintHandler(banner, kb.bannerFp)
        parseXmlFile(xmlfile, handler)
        parseXmlFile(paths.GENERIC_XML, handler)
def bannerParser ( banner ) : xmlfile = None if Backend . isDbms ( DBMS . MSSQL ) : xmlfile = paths . MSSQL_XML elif Backend . isDbms ( DBMS . MYSQL ) : xmlfile = paths . MYSQL_XML elif Backend . isDbms ( DBMS . ORACLE ) : xmlfile = paths . ORACLE_XML elif Backend . isDbms ( DBMS . PGSQL ) : xmlfile = paths . PGSQL_XML if not xmlfile : return if Backend . isDbms ( DBMS . MSSQL ) : handler = MSSQLBannerHandler ( banner , kb . bannerFp ) parseXmlFile ( xmlfile , handler ) handler = FingerprintHandler ( banner , kb . bannerFp ) parseXmlFile ( paths . GENERIC_XML , handler ) else : handler = FingerprintHandler ( banner , kb . bannerFp ) parseXmlFile ( xmlfile , handler ) parseXmlFile ( paths . GENERIC_XML , handler )