Haktrails is a Golang client for querying SecurityTrails API data, sponsored by SecurityTrails.

Unlock the potential of SecurityTrails API with Haktrails, a versatile Golang client designed to streamline your security investigations.

From subdomain discovery to historical DNS data retrieval, Haktrails offers an array of powerful features for cybersecurity professionals and bug bounty hunters alike.

Explore its capabilities and harness the wealth of information at your fingertips.

Tool Features

  • stdin input for easy tool chaining
  • subdomain discovery
  • associated root domain discovery
  • associated IP discovery
  • historical DNS data
  • historical whois data
  • DSL queries (currently a prototype)
  • company discovery (discover the owner of a domain)
  • whois (returns json whois data for a given domain)
  • ping (check that your current SecurityTrails configuration/key is working)
  • usage (check your current SecurityTrails usage)
  • “json” or “list” output options for easy tool chaining
  • “ZSH & Bash autocompletion”

Installation

You will need a SecurityTrails API key to use this tool. If you’re using it for bug bounties, I’d recommend checking out the bug bounty hunter’s toolkit if you’re a bug bounty hunter. It provides access to the majority of data that you will need for a good price. See the details below.

Once you have an API key, install golang, then:

#Go version > 1.17
go install -v github.com/hakluke/haktrails@latest
~/go/bin/haktrails

# Go version < 1.17
# https://golang.org/doc/go-get-install-deprecation

go get github.com/hakluke/haktrails
~/go/bin/haktrails

I’d recommend adding ~/go/bin/ to your $PATH if you haven’t already, then you can just run haktrails.

Autocompletion (Optional)

ZSH and Bash autocompletion is available Just add this to your ~/.zshrc or ~/.bashrc

source ~/go/src/github.com/hakluke/haktrails/haktrails-completion.zsh
or
source ~/go/src/github.com/hakluke/haktrails/haktrails-completion.bash

For more information click here