CrowdStrike FalconPy Tools
Project description
FalconPy Tools
A collection of tools for interacting with the CrowdStrike Falcon API.
Basic usage example
The following example demonstrates using the Hosts Toolbox to retrieve a host AID.
import os
from falconpytools.hosts import HostsToolbox, Host
from falconpytools.rtr import RTRToolbox, SingleTarget
# Open the RTR toolbox
rtr = RTRToolbox(os.environ["FALCON_CLIENT_ID"],
os.environ["FALCON_CLIENT_SECRET"],
verbose=True
)
# Open the Hosts toolbox
hosts = HostsToolbox(auth_object=rtr.api.rtr.auth_object,
verbose=True
)
# Host helper
host = Host(api=hosts.api, verbose=hosts.verbose)
# Lookup the AID for our search string
target_aid = host.find_host_aid(hostname="SEARCH-STRING")
hostname = host.get_host(target_aid)[0]["hostname"]
# RTR Single Target helper
target = SingleTarget(api=rtr.api, verbose=rtr.verbose)
# Initialize a RTR session
target_session = target.connect_to_host(target_aid)
# Execute a RTR command
command_result = host.execute_command("ifconfig", target_session)
# Disconnect from the RTR session
host.disconnect_from_host(target_session)
# Output the results
print(command_result)
Installation
python3 -m pip install crowdstrike-falconpy-tools
Upgrading
python3 -m pip install crowdstrike-falconpy-tools --upgrade
Removal
python3 -m pip uninstall crowdstrike-falconpy-tools
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for crowdstrike-falconpy-tools-0.0.11.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f0da29e10c9b083ceb89bb9e478215eeb03aa126f8964a2f924d39fae7f17e3 |
|
MD5 | 2e7c514a85896aa58a510482cf3f8bbd |
|
BLAKE2b-256 | 26ea1bff3b071e528b7edbae5dd04ad83cd7e43b6a87dc51635766deea37d598 |
Close
Hashes for crowdstrike_falconpy_tools-0.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb06f99b74a43413430ad39770764c6f0fe54c75c2e21b32cbb08991c2d23929 |
|
MD5 | ceeae9266c6555cdbaccdbef72c6962c |
|
BLAKE2b-256 | dda94449c0ac52f24d728847305c124c9dc0848d179796de8d47774c058f59bd |