SSL Results

SSL certificates are availble in three different ways with the PassiveTotal client. Users can get SSL certificate details, run searches against specific fields or get the history of a specific SSL certificate.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
from passivetotal.libs.ssl import SslRequest
from passivetotal.libs.ssl import SslResponse

client = SslRequest.from_config()
raw_results = client.get_ssl_certificate_details(
    query="www.passivetotal.org"
)

loaded = SslResponse(raw_results)
print loaded.table

SslRequest

class passivetotal.libs.ssl.SslRequest(*args, **kwargs)

Bases: passivetotal.api.Client

Client to interface with the SSL calls from the PassiveTotal API.

get_ssl_certificate_details(**kwargs)

Get SSL certificate details based on query value.

Reference:

Parameters:
  • query (str) – SHA-1 or IP address
  • compact_record (str) – Return the record in a compact format
Returns:

SSL certificate details for the query

get_ssl_certificate_history(**kwargs)

Search SSL certificate history.

Reference:

Parameters:
  • query (str) – SHA-1 or IP address
  • compact_record (str) – Return the record in a compact format
  • field (str) – Field to run the query against
  • type (str) – Type of search to conduct
Returns:

WHOIS records matching the query

search_ssl_certificate_by_field(**kwargs)

Search SSL certificate details based on query value and field.

Reference:

Parameters:
  • query (str) – Query value to use when making the request for data
  • compact_record (str) – Return the record in a compact format
  • field (str) – Field to run the query against
  • type (str) – Type of search to conduct
Returns:

SSL certificates matching the query

SslHistoryResponse

class passivetotal.libs.ssl.SslHistoryResponse(*args, **kwargs)

Bases: passivetotal.response.Response

Result object to ease interaction with data.

csv

Output data as CSV.

Returns:String of formatted data
table

Output data as table.

Returns:Table of formatted data
text

Output data as text.

Returns:String of formatted data

HistoryRecord

class passivetotal.libs.ssl.HistoryRecord(record)

Bases: object

Provide some basic helpers for the SSL certificate records.

classmethod process(inferred, record)

Process results and return a loaded instance.

Parameters:
  • inferred (object) – Instance of the class itself
  • record (dict) – Record to use for loading
Returns:

Instance of the loaded class