How to use the passivetotal.common.const.SSL_VALID_FIELDS function in passivetotal

To help you get started, we’ve selected a few passivetotal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github passivetotal / python_api / passivetotal / libs / ssl.py View on Github external
def csv(self):
        """Output data as CSV.

        :return: String of formatted data
        """
        for result in self._results.get('results', []):
            data = [result.get(detail, '') for detail in SSL_VALID_FIELDS]
        return utilities.to_csv(SSL_VALID_FIELDS, [data])
github passivetotal / python_api / passivetotal / libs / ssl.py View on Github external
def csv(self):
        """Output data as CSV.

        :return: String of formatted data
        """
        for result in self._results.get('results', []):
            data = [result.get(detail, '') for detail in SSL_VALID_FIELDS]
        return utilities.to_csv(SSL_VALID_FIELDS, [data])
github passivetotal / python_api / passivetotal / libs / ssl.py View on Github external
def search_ssl_certificate_by_field(self, **kwargs):
        """Search SSL certificate details based on query value and field.

        Reference: https://api.passivetotal.org/api/docs/#api-SSL_Certificates-GetSslCertificateSearchQueryField

        :param str query: Query value to use when making the request for data
        :param str compact_record: Return the record in a compact format
        :param str field: Field to run the query against
        :param str type: Type of search to conduct
        :return: SSL certificates matching the query
        """
        if 'field' not in kwargs:
            raise MISSING_FIELD("Field value is required.")
        if kwargs['field'] not in SSL_VALID_FIELDS:
            raise INVALID_FIELD_TYPE("Field must be one of the following: %s"
                                     % ', '.join(SSL_VALID_FIELDS))
        return self._get('ssl-certificate', 'search', **kwargs)
github passivetotal / python_api / passivetotal / libs / ssl.py View on Github external
def search_ssl_certificate_by_field(self, **kwargs):
        """Search SSL certificate details based on query value and field.

        Reference: https://api.passivetotal.org/api/docs/#api-SSL_Certificates-GetSslCertificateSearchQueryField

        :param str query: Query value to use when making the request for data
        :param str compact_record: Return the record in a compact format
        :param str field: Field to run the query against
        :param str type: Type of search to conduct
        :return: SSL certificates matching the query
        """
        if 'field' not in kwargs:
            raise MISSING_FIELD("Field value is required.")
        if kwargs['field'] not in SSL_VALID_FIELDS:
            raise INVALID_FIELD_TYPE("Field must be one of the following: %s"
                                     % ', '.join(SSL_VALID_FIELDS))
        return self._get('ssl-certificate', 'search', **kwargs)