Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when including OTX Api Key #144

Open
Raymond-JV opened this issue Jun 24, 2024 · 2 comments
Open

Error when including OTX Api Key #144

Raymond-JV opened this issue Jun 24, 2024 · 2 comments

Comments

@Raymond-JV
Copy link

Raymond-JV commented Jun 24, 2024

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.

@NoPurposeInLife
Copy link

+1

@sto-ic
Copy link

sto-ic commented Jan 16, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants