()
Example of kb.bannerFp dictionary:

    {
      'sp': set(['Service Pack 4']),
      'dbmsVersion': '8.00.194',
      'dbmsServicePack': '0',
      'distrib': set(['2000']),
      'dbmsRelease': '2000',
      'type': set(['Windows'])
    }
Example of kb.bannerFp dictionary:
Example of kb . bannerFp dictionary :
def setOs():
    """
    Example of kb.bannerFp dictionary:

    {
      'sp': set(['Service Pack 4']),
      'dbmsVersion': '8.00.194',
      'dbmsServicePack': '0',
      'distrib': set(['2000']),
      'dbmsRelease': '2000',
      'type': set(['Windows'])
    }
    """

    infoMsg = ""

    if not kb.bannerFp:
        return

    if "type" in kb.bannerFp:
        Backend.setOs(Format.humanize(kb.bannerFp["type"]))
        infoMsg = "the back-end DBMS operating system is %s" % Backend.getOs()

    if "distrib" in kb.bannerFp:
        kb.osVersion = Format.humanize(kb.bannerFp["distrib"])
        infoMsg += " %s" % kb.osVersion

    if "sp" in kb.bannerFp:
        kb.osSP = int(Format.humanize(kb.bannerFp["sp"]).replace("Service Pack ", ""))

    elif "sp" not in kb.bannerFp and Backend.isOs(OS.WINDOWS):
        kb.osSP = 0

    if Backend.getOs() and kb.osVersion and kb.osSP:
        infoMsg += " Service Pack %d" % kb.osSP

    if infoMsg:
        logger.info(infoMsg)

    hashDBWrite(HASHDB_KEYS.OS, Backend.getOs())
def setOs ( ) : infoMsg = "" if not kb . bannerFp : return if "type" in kb . bannerFp : Backend . setOs ( Format . humanize ( kb . bannerFp [ "type" ] ) ) infoMsg = "the back-end DBMS operating system is %s" % Backend . getOs ( ) if "distrib" in kb . bannerFp : kb . osVersion = Format . humanize ( kb . bannerFp [ "distrib" ] ) infoMsg += " %s" % kb . osVersion if "sp" in kb . bannerFp : kb . osSP = int ( Format . humanize ( kb . bannerFp [ "sp" ] ) . replace ( "Service Pack " , "" ) ) elif "sp" not in kb . bannerFp and Backend . isOs ( OS . WINDOWS ) : kb . osSP = 0 if Backend . getOs ( ) and kb . osVersion and kb . osSP : infoMsg += " Service Pack %d" % kb . osSP if infoMsg : logger . info ( infoMsg ) hashDBWrite ( HASHDB_KEYS . OS , Backend . getOs ( ) )