nokey.developer_tools package
Submodules
nokey.developer_tools.apis_guru module
- class nokey.developer_tools.apis_guru.APIsGuru(use_caching=False, cache_name='api_gurus_cache', backend='sqlite', expire_after=3600)[source]
Bases:
objectA class to interact with the APIs.guru API.
- base_url
The base url for the APIs.guru API.
- about
A short description of the API.
- get_all_apis()[source]
Returns a list of all the APIs in the API directory.
- Parameters:
None –
- Returns:
A dictionary containing a list of all the APIs in the directory.
- Return type:
dict
- get_all_providers()[source]
Returns a list of all the providers in the API directory.
- Parameters:
None –
- Returns:
A dictionary containing a list of all the providers in the directory.
- Return type:
dict
- get_apis_by_provider(provider)[source]
Returns a list of all the APIs for a particular provider.
- Parameters:
provider (str) – The name of the api provider.
- Returns:
A dictionary containing a list of all the APIs for a particular provider.
- Return type:
dict
- get_basic_metrics()[source]
Returns basic metrics for the entire API directory.
- Parameters:
None –
- Returns:
A dictionary containing basic metrics for the entire directory.
- Return type:
dict
- get_docs_url()[source]
Returns the URL for the APIs.guru API documentation.
- Parameters:
None –
- Returns:
The URL for the API docs.
- Return type:
string
- get_particular_api_version_no_service_name(provider, api)[source]
Returns the API entry for one specific version of an API where there is no service name.
- Parameters:
provider (str) – The name of the provider.
api (str) – The api.
- Returns:
A dictionary containing the API entry for one specific version of an API where there is no service name.
- Return type:
dict
- get_particular_api_version_with_service_name(provider, service, api)[source]
Returns the API entry for one specific version of an API where there is a s ervice name.
- Parameters:
provider (str) – The name of the provider.
service (str) – The name of the service.
api (str) – The name of the API.
- Returns:
A dictionary containing the API entry for one specific version of an API where there is a service name.
- Return type:
dict
nokey.developer_tools.filter_lists module
- class nokey.developer_tools.filter_lists.FilterLists(use_caching=False, cache_name='filter_lists_cache', backend='sqlite', expire_after=3600)[source]
Bases:
objectA class for interacting with the FilterLists API.
- base_url
The base URL of the FilterLists API.
- about
A short description of the API.
- get_docs_url()[source]
Returns the URL for the FilterLists API documentation.
- Parameters:
None –
- Returns:
The URL for the API docs.
- Return type:
string
- get_languages()[source]
Returns the languages targeted by the FilterLists.
- Parameters:
None –
- Returns:
A dictionary containing a list of languages targeted by the FilterLists.
- Return type:
dict
- get_licenses()[source]
Returns the licenses applied to the FilterLists.
- Parameters:
None –
- Returns:
A dictionary containing a list of licenses applied to the FilterLists.
- Return type:
dict
- get_list_by_id(list_id)[source]
Returns details of a specific FilterList matching the given id.
- Parameters:
list_id (int) – A unique numerical identifier for a FilterList.
- Returns:
A dictionary containing details of the FilterList.
- Return type:
dict
- get_lists()[source]
Returns the FilterLists.
- Parameters:
None –
- Returns:
A dictionary containing the FilterLists.
- Return type:
dict
- get_maintainers()[source]
Returns the maintainers of the FilterLists.
- Parameters:
None –
- Returns:
A dictionary containing the maintainers of the FilterLists.
- Return type:
dict
- get_software()[source]
Returns the software that subscribes to the FilterLists.
- Parameters:
None –
- Returns:
A dictionary containing the software that subscribes to the FilterLists.
- Return type:
dict
nokey.developer_tools.microlink module
- class nokey.developer_tools.microlink.Microlink(use_caching=False, cache_name='microlink_cache', backend='sqlite', expire_after=3600)[source]
Bases:
objectA class for interacting with the Microlink API.
- base_url
The base URL of the API.
- about
A short description of the API.
- get_color_palette_for_target_url(url)[source]
Returns metadata containing the predominant color pallette for each image detected over the target URL.
- Parameters:
url (str) – The target URL.
- Returns:
A dictionary of metadata containing the predominant color pallette for each image detected over the target URL.
- Return type:
dict
- get_docs_url()[source]
Returns the URL for the Microlink API documentation.
- Parameters:
None –
- Returns:
The URL for the API docs.
- Return type:
string
- get_metadata_for_target_url(url)[source]
Returns metadata for the target URL.
- Parameters:
url (str) – The target URL.
- Returns:
A dictionary containing metadata for the target URL.
- Return type:
dict
nokey.developer_tools.url_haus module
- class nokey.developer_tools.url_haus.URLHaus(use_caching=False, cache_name='urlhaus_cache', backend='sqlite', expire_after=3600)[source]
Bases:
objectA class to interact with the URLHaus API.
- base_url
The base URL of the API.
- about
A short description of the API.
- download_malware_sample(sha256)[source]
Downloads a zip file containing the malware sample (payload).
- Parameters:
base_url (str) – The base URL of the API.
sha256 (str) – The SHA256 hash identifying the malware sample (payload) to be downloaded.
- Returns:
Path to the downloaded ZIP file if successful, error message otherwise.
- Return type:
str
- get_docs_url()[source]
Returns the URL for the URLHaus API documentation.
- Parameters:
None –
- Returns:
The URL for the API docs.
- Return type:
string
- get_info_about_host(host)[source]
Returns any information URLHaus may have about a specific host.
- Parameters:
host (str) – The IPv4 address, domain name, or hostname in question.
- Returns:
A dictionary containing information about a specific host.
- Return type:
dict
- get_info_about_payload(p_load)[source]
Returns any information URLHaus has about a specific payload (malware sample).
- Parameters:
p_load (str) – The MD5 hash or SHA256 hash of the payload (malware sample).
- Returns:
A dictionary containing information about a specific payload.
- Return type:
dict
- get_info_about_signature(signature)[source]
Returns any information URLHaus has about a specific signature.
- Parameters:
signature (str) – The signature to query.
- Returns:
A dictionary containing information about a specific signature.
- Return type:
dict
- get_info_about_tag(tag)[source]
Returns any information URLHaus has about a specific tag.
- Parameters:
tag (str) – The tag to query.
- Returns:
A dictionary containing information about a specific tag.
- Return type:
dict
- get_info_about_url(url)[source]
Returns any information URLHaus may have about a specific URL.
- Parameters:
url (str) – The URL in question.
- Returns:
A dictionary containing information about a specific URL.
- Return type:
dict
- get_info_about_url_by_id(urlID)[source]
Returns any information URLHaus may have about a specific URL.
- Parameters:
urlID (int) – The id of the URL in question.
- Returns:
A dictionary containing information about a specific URL.
- Return type:
dict
nokey.developer_tools.url_shortener module
- class nokey.developer_tools.url_shortener.UrlShortener(use_caching=False, cache_name='url_shortener_cache', backend='sqlite', expire_after=3600)[source]
Bases:
objectA class for interacting with the URL Shortener API.
- base_url
The base URL of the URL Shortener API.
- about
A short description of the API.
- get_docs_url()[source]
Returns the URL for the URL Shortener API documentation.
- Parameters:
None –
- Returns:
The URL for the API docs
- Return type:
string
- shorten_url(url, shorturl=None)[source]
Returns the shortened URL for the given parameters.
- Parameters:
url (str) – The original URL to be shortened.
shorturl (str) – Optional parameter for a desired short URL if available (case sensitive). Must be between 5 and 30 characters. Defaults to None.
- Returns:
Dictionary containing the shortened URL.
- Return type:
dict