Crystal SDK and command line client for SonarSearch/Crobat.
Prebuilt binary releases available here. Prebuilt Docker container available here.
To grab the latest release:
wget https://github.com/PercussiveElbow/crobat-sdk-crystal/releases/latest/download/crobat_client && chmod +x ./crobat_client
To run the latest Docker container (~20MB)
sudo docker run -it ghcr.io/percussiveelbow/crobat:latest
Usage: ./crobat_client [arguments]
-q QUERY, --query Target domain, IP or IP range to query.
-s TYPE, --type Search type. (SUBDOMAIN, ALL, REVERSE TLD)
-f FORMAT, --format File output format. (JSON, TXT, CSV)
-o FILE, --output File output location.
-h, --help Show help.
E.g ./crobat_client -q twitter.com -s subdomain
To build and use the Docker container:
sudo docker build . -t crobat && sudo docker run -it crobat -q twitter.com -s subdomain
Add the SDK as a dependency within your shards.yml:
dependencies:
crobat:
github: percussiveelbow/crobat-sdk-crystal
Then simply require "crobat/crobat_sdk"
at the top of your file.
The client object can then be instantiated and used like below.
require "crobat/crobat_sdk"
client = Crobat::CrobatSDK.new("https://sonar.omnisint.io")
# Retrieving subdomains via SDK
puts(client.retrieve_subdomains("twitter.com"))
# Retrieving all results via SDK
puts(client.retrieve_all("twitter.com"))
# Retrieving tlds via SDK
puts(client.retrieve_tlds("twitter.com"))
# Retrieving reverse info for an IP via SDK
puts(client.retrieve_reverse("8.8.8.8"))
# Retrieving reverse info for an IP range via SDK
puts(client.retrieve_reverse_range("95.138.157.0/16"))
crystal build --static --release src/crobat_client.cr
crystal build --static --release src/crobat_sdk.cr