(target, info)
Formats the back-end operating system fingerprint value
        and return its values formatted as a human readable string.

        Example of info (kb.headersFp) dictionary:

        {
          'distrib': set(['Ubuntu']),
          'type': set(['Linux']),
          'technology': set(['PHP 5.2.6', 'Apache 2.2.9']),
          'release': set(['8.10'])
        }

        Example of info (kb.bannerFp) dictionary:

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

        @return: detected back-end operating system based upon fingerprint
        techniques.
        @rtype: C{str}
Formats the back-end operating system fingerprint value
        and return its values formatted as a human readable string.
Formats the back - end operating system fingerprint value and return its values formatted as a human readable string .
def getOs(target, info):
        """
        Formats the back-end operating system fingerprint value
        and return its values formatted as a human readable string.

        Example of info (kb.headersFp) dictionary:

        {
          'distrib': set(['Ubuntu']),
          'type': set(['Linux']),
          'technology': set(['PHP 5.2.6', 'Apache 2.2.9']),
          'release': set(['8.10'])
        }

        Example of info (kb.bannerFp) dictionary:

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

        @return: detected back-end operating system based upon fingerprint
        techniques.
        @rtype: C{str}
        """

        infoStr = ""
        infoApi = {}

        if info and "type" in info:
            if hasattr(conf, "api"):
                infoApi["%s operating system" % target] = info
            else:
                infoStr += "%s operating system: %s" % (target, Format.humanize(info["type"]))

                if "distrib" in info:
                    infoStr += " %s" % Format.humanize(info["distrib"])

                if "release" in info:
                    infoStr += " %s" % Format.humanize(info["release"])

                if "sp" in info:
                    infoStr += " %s" % Format.humanize(info["sp"])

                if "codename" in info:
                    infoStr += " (%s)" % Format.humanize(info["codename"])

        if "technology" in info:
            if hasattr(conf, "api"):
                infoApi["web application technology"] = Format.humanize(info["technology"], ", ")
            else:
                infoStr += "\nweb application technology: %s" % Format.humanize(info["technology"], ", ")

        if hasattr(conf, "api"):
            return infoApi
        else:
            return infoStr.lstrip()
def getOs ( target , info ) : infoStr = "" infoApi = { } if info and "type" in info : if hasattr ( conf , "api" ) : infoApi [ "%s operating system" % target ] = info else : infoStr += "%s operating system: %s" % ( target , Format . humanize ( info [ "type" ] ) ) if "distrib" in info : infoStr += " %s" % Format . humanize ( info [ "distrib" ] ) if "release" in info : infoStr += " %s" % Format . humanize ( info [ "release" ] ) if "sp" in info : infoStr += " %s" % Format . humanize ( info [ "sp" ] ) if "codename" in info : infoStr += " (%s)" % Format . humanize ( info [ "codename" ] ) if "technology" in info : if hasattr ( conf , "api" ) : infoApi [ "web application technology" ] = Format . humanize ( info [ "technology" ] , ", " ) else : infoStr += "\nweb application technology: %s" % Format . humanize ( info [ "technology" ] , ", " ) if hasattr ( conf , "api" ) : return infoApi else : return infoStr . lstrip ( )