API Wrappers¶
Base Client¶
PassiveTotal API Interface.
-
class
passivetotal.api.Client(username, api_key, server='api.passivetotal.org', version='v2', http_proxy=None, https_proxy=None)¶ Base client that all data sources will inherit from.
-
_dump_requests()¶ Dump requests being made.
-
_endpoint(endpoint, action, *url_args)¶ Return the URL for the action.
Parameters: Returns: Full URL for the requested action
-
_get(endpoint, action, *url_args, **url_params)¶ Request API Endpoint - for GET methods.
Parameters: Returns: response deserialized from JSON
-
_json(response)¶ JSON response from server.
Parameters: response – Response from the server Throws ValueError: from requests’ response.json() error Returns: response deserialized from JSON
-
_send_data(method, endpoint, action, data, *url_args, **url_params)¶ Submit to API Endpoint - for DELETE, PUT, POST methods.
Parameters: Returns: response deserialized from JSON
-
_undump_requests()¶ Reload request details.
-
classmethod
from_config()¶ Method to return back a loaded instance.
-
DNS Request¶
-
class
passivetotal.libs.dns.DnsRequest(*args, **kwargs)¶ Bases:
passivetotal.api.ClientClient to interface with the DNS calls from the PassiveTotal API.
-
get_passive_dns(**kwargs)¶ Get passive DNS data based on a query value.
Reference:
Parameters: Returns: List of passive DNS results
-
get_unique_resolutions(**kwargs)¶ Get unique resolutions from passive DNS.
Reference:
Parameters: Returns: List of passive DNS unique resolutions
-
WHOIS Request¶
-
class
passivetotal.libs.whois.WhoisRequest(*args, **kwargs)¶ Bases:
passivetotal.api.ClientClient to interface with the WHOIS calls from the PassiveTotal API.
-
get_whois_details(**kwargs)¶ Get WHOIS details based on query value.
Reference:
Parameters: Returns: WHOIS details for the query
-
search_whois_by_field(**kwargs)¶ Search WHOIS details based on query value and field.
Reference:
Parameters: Returns: WHOIS records matching the query
-
SSL Request¶
-
class
passivetotal.libs.ssl.SslRequest(*args, **kwargs)¶ Bases:
passivetotal.api.ClientClient 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: Returns: SSL certificate details for the query
-
get_ssl_certificate_history(**kwargs)¶ Search SSL certificate history.
Reference:
Parameters: Returns: WHOIS records matching the query
-
search_ssl_certificate_by_field(**kwargs)¶ Search SSL certificate details based on query value and field.
Reference:
Parameters: Returns: SSL certificates matching the query
-