Provides a python wrapper to the security trails api.
Function
Initial class instantiation
Parameter | Details | Required |
---|---|---|
api_key | API Key authorising connection | Required |
prettyPrint | Converts output to a print friendly version of JSON, Defaults to False providing a dictionary output | Not Required (Default Set) |
base_url | API Default API location, Defaults to 'https://api.securitytrails.com/v1/' | Not Required (Default Set) |
Function
Domain information endpoints that return various information about domains.
Usage
Parameter | Details | Required |
---|---|---|
domain | The domain that you are requesting | Required |
Example
s = SecurityTrails(api_key='yourapikey')
s.get_history_whois("netflix.com")
Function
Returns subdomains for a given domain.
Usage
Parameter | Details | Required |
---|---|---|
domain | The domain that you are requesting | Required |
Example
s = SecurityTrails(api_key='yourapikey')
s.get_subdomain("netflix.com")
Function
Returns tags for a given domain.
Usage
Parameter | Details | Required |
---|---|---|
domain | The domain that you are requesting | Required |
Example
s = SecurityTrails(api_key='yourapikey')
s.get_tags("netflix.com")
Function
Returns the current WHOIS data about a given domain with the stats merged together.
Usage
Parameter | Details | Required |
---|---|---|
domain | The domain that you are requesting | Required |
Example
s = SecurityTrails(api_key='yourapikey')
s.get_whois("netflix.com")
Function
Returns the neighbors in any given IP level range and essentially allows you to explore closeby IP addresses.
Usage
Parameter | Details | Required |
---|---|---|
ip | The ip that you are requesting | Required |
mask | The IP mask. Defaults to 32 bit mask | Not Required (Default Set) |
Example
s = SecurityTrails(api_key='yourapikey')
s.ip_explorer("netflix.com")
Function Test ping to Security Trails API
No parameters: Relies on API key being set in class instantiation. Returns True for successful connection and False for unsuccessful.
Usage
Example
s = SecurityTrails(api_key='yourapikey')
s.test_connect()