INNER CODE UNIT · Python

_get_role_confidence

faucetsdn/poseidon · lib/poseidon_cli/poseidon_cli/cli.py:142

    def _get_role_confidence(endpoint):
        _, confidences, _ = endpoint.get_roles_confidences_pcap_labels()
        return str(confidences[0])

    @staticmethod
    def _get_pcap_labels(endpoint):
        _, _, pcap_labels = endpoint.get_roles_confidences_pcap_labels()
        return pcap_labels

    @staticmethod
    def _get_ipv4_os(endpoint):
        endpoint_ip = GetData._get_ipv4(endpoint)
        ipv4_addresses = endpoint.metadata.get("ipv4_addresses", None)
        if endpoint_ip and ipv4_addresses and endpoint_ip in ipv4_addresses:
            metadata = ipv4_addresses[endpoint_ip]
            if "short_os" in metadata:
                return metadata["short_os"]
        return NO_DATA

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…