gau icon indicating copy to clipboard operation
gau copied to clipboard

Error when including OTX Api Key

Open Raymond-JV opened this issue 1 year ago • 2 comments

When including an OTX key, I receive the following error. 'otx' expected type 'string', got unconvertible type 'map[string]interface {}'

Format used in my .gau.toml file

[urlscan]
  apikey="xxx-xxx-xxx"

[otx]
  apikey="xxx-xxx-xxx"

Any advice? Is the otx api key not supported or recommended for use? I also tried removing "apikey=" and the new line from file.

Raymond-JV avatar Jun 24 '24 15:06 Raymond-JV

+1

NoPurposeInLife avatar Nov 03 '24 07:11 NoPurposeInLife

Just came across this issue and took a look at source.

The URLScanConfig struct expects a host and apikey under the urlscan table (mapstructure tags)

See: https://github.com/lc/gau/blob/bfc58a0aae892d09aa420844fa7759b7f01b71dd/runner/flags/flags.go#L23C1-L26C2 https://github.com/lc/gau/blob/bfc58a0aae892d09aa420844fa7759b7f01b71dd/pkg/providers/providers.go#L18C1-L22C1

This should work:

[urlscan]
host = ""
apikey = "APIKEYHERE"

# OTX is a just direct string, no need for  mapstructure
otx = "APIKEYHERE"

You can leave the host key empty for urlscan, the baseurl will be assumed.

sto-ic avatar Jan 16 '25 13:01 sto-ic