SDKs overview
FullHunt offers Software Development Kits (SDKs) and libraries designed to facilitate interaction with its External Attack Surface Management (EASM) platform. These tools enable developers to programmatically access and manage assets, vulnerabilities, and security data through the FullHunt API. By abstracting the underlying HTTP requests and response parsing, SDKs aim to simplify integration for various programming languages and environments. The primary method for interacting with FullHunt's capabilities is through its RESTful API, which is detailed in the FullHunt API reference documentation.
SDKs typically handle aspects such as authentication, request serialization, response deserialization, and error handling, allowing developers to focus on the business logic of their applications. While FullHunt maintains an official SDK for Python, community contributions also extend support to other languages, providing developers with flexibility in their technology choices.
Official SDKs by language
FullHunt currently provides an official SDK for Python. This SDK is maintained by FullHunt and offers a comprehensive set of functionalities to interact with the FullHunt API, covering asset management, vulnerability data retrieval, and search operations. The official Python SDK is designed to ensure compatibility and leverage the latest features of the FullHunt platform.
The following table summarizes the key details of the official SDK:
| Language | Package Name | Installation Command | Maturity |
|---|---|---|---|
| Python | fullhunt |
pip install fullhunt |
Stable |
For detailed usage instructions and API methods available through the Python SDK, developers should consult the official FullHunt API documentation.
Installation
Installing the FullHunt SDKs is typically performed using standard package managers for each respective language. For the official Python SDK, the pip package installer is used. Before installation, it is recommended to ensure that a compatible version of Python is installed on your system. Python 3.7 or newer is generally advised for modern SDKs to ensure access to the latest language features and security updates, as outlined in web development best practices.
Python SDK installation
To install the official FullHunt Python SDK, open your terminal or command prompt and execute the following command:
pip install fullhunt
This command downloads and installs the fullhunt package and its dependencies from the Python Package Index (PyPI). After installation, the SDK can be imported into Python scripts or interactive sessions.
Quickstart example
This quickstart example demonstrates how to use the official FullHunt Python SDK to authenticate with the API and perform a basic asset discovery query. To use this example, you will need a FullHunt API key, which can be obtained from your FullHunt account settings.
Python quickstart
First, ensure you have installed the FullHunt Python SDK as described in the Installation section.
Create a Python file (e.g., fullhunt_example.py) and add the following code:
import os
from fullhunt import FullHunt
# It is recommended to store your API key in an environment variable
# For demonstration purposes, you can replace os.environ.get with your key directly,
# but this is not recommended for production environments.
FULLHUNT_API_KEY = os.environ.get("FULLHUNT_API_KEY", "YOUR_ACTUAL_API_KEY_HERE")
# Initialize the FullHunt client
# The API key will be read from the environment variable FULLHUNT_API_KEY by default
# or explicitly passed as an argument.
client = FullHunt(api_key=FULLHUNT_API_KEY)
try:
# Perform an asset search, e.g., for a specific domain
# Replace 'example.com' with the target you wish to query
print("Searching for assets related to 'example.com'...")
assets = client.get_assets_by_query(query="domain:example.com", limit=5)
if assets:
print(f"Found {len(assets)} assets:")
for asset in assets:
print(f" - Type: {asset.get('type')}, Value: {asset.get('value')}")
else:
print("No assets found for 'example.com'.")
# Example: Get details for a specific asset (replace with a known asset ID)
# asset_id = "your_asset_id_here"
# if asset_id != "your_asset_id_here":
# print(f"\nGetting details for asset ID: {asset_id}")
# asset_details = client.get_asset(asset_id)
# print(f" Asset Details: {asset_details}")
except Exception as e:
print(f"An error occurred: {e}")
Before running the script:
- Replace
"YOUR_ACTUAL_API_KEY_HERE"with your actual FullHunt API key. For security, it is highly recommended to set this as an environment variable namedFULLHUNT_API_KEY. - Modify
'domain:example.com'to query for assets relevant to your organization or target.
To run the script, save the file and execute it from your terminal:
python fullhunt_example.py
This script will connect to the FullHunt API, search for assets matching the specified query, and print the results to the console. This demonstrates a fundamental interaction for exploring your attack surface programmatically.
Community libraries
Beyond the official Python SDK, the FullHunt ecosystem benefits from community-contributed libraries and tools. These resources are developed and maintained by third-party developers and users of the FullHunt platform. While not officially supported or guaranteed by FullHunt, community libraries can offer bindings for other programming languages, integrations with specific tools, or specialized functionalities not present in the official SDK.
Community contributions typically emerge from active participation within developer communities, often hosted on platforms like GitHub. Users interested in exploring these options are encouraged to search public repositories for projects related to "FullHunt API" or "FullHunt SDK" in their preferred language. For instance, open-source projects providing client libraries for various APIs are a common practice in the developer community, as exemplified by projects often featured on Google's open-source initiatives.
When considering a community library, it is advisable to evaluate its:
- Maintenance status: Check the last commit date and activity level.
- Documentation: Ensure it provides clear instructions and examples.
- License: Understand the terms under which the library can be used.
- Community support: Look for issue trackers, forums, or other avenues for help.
Developers using community-contributed libraries should be aware that support and updates may vary, and they might need to adapt to changes or contribute fixes themselves. However, these libraries can be valuable for extending FullHunt's capabilities into diverse technical stacks.