projectdiscovery / subfinder

Fast passive subdomain enumeration tool.
https://projectdiscovery.io
MIT License
10.37k stars 1.29k forks source link

[Issue] panic: runtime error: index out of range [2] with length 2 #1075

Closed gy741 closed 10 months ago

gy741 commented 12 months ago

Describe the bug

Hello,

The following error occurs when using the default subdomain as input.

panic: runtime error: index out of range [2] with length 2

goroutine 537 [running]:
github.com/projectdiscovery/subfinder/v2/pkg/subscraping/sources/redhuntlabs.(*Source).Run.func1()
        /home/runner/work/subfinder/subfinder/v2/pkg/subscraping/sources/redhuntlabs/redhuntlabs.go:53 +0xd7b
created by github.com/projectdiscovery/subfinder/v2/pkg/subscraping/sources/redhuntlabs.(*Source).Run
        /home/runner/work/subfinder/subfinder/v2/pkg/subscraping/sources/redhuntlabs/redhuntlabs.go:39 +0x12d

Thanks.

Subfinder version

[INF] Current Version: v2.6.3

Complete command you used to reproduce this

Primary subdomains exist in the subdomain.txt file.

Ex) dev.example.com

subfinder -dL subdomain.txt -o subdomain_2.txt -all -v
dogancanbakir commented 11 months ago

@gy741, Can you confirm if you have configured RedHunt Labs? And if you have, please tell me how you did it.

It works for me:

$ go run . -d example.com -s redhuntlabs -v

               __    _____           __         
   _______  __/ /_  / __(_)___  ____/ /__  _____
  / ___/ / / / __ \/ /_/ / __ \/ __  / _ \/ ___/
 (__  ) /_/ / /_/ / __/ / / / / /_/ /  __/ /    
/____/\__,_/_.___/_/ /_/_/ /_/\__,_/\___/_/

                projectdiscovery.io

[INF] Current subfinder version v2.6.4-dev (development)
[INF] Loading provider config from /Users/dogancanbakir/Library/Application Support/subfinder/provider-config.yaml
[DBG] API key(s) found for redhuntlabs.
[DBG] Selected source(s) for this search: redhuntlabs
[INF] Enumerating subdomains for example.com
...
[INF] Found 9952 subdomains for example.com in 1 minute 9 seconds

config file:

$ cat "/Users/dogancanbakir/Library/Application Support/subfinder/provider-config.yaml"
bevigil: []
binaryedge: []
bufferover: []
builtwith: []
c99: []
censys: []
certspotter: []
chaos: []
chinaz: []
dnsdb: []
dnsrepo: []
facebook: []
fofa: [
fullhunt: []
github: []
hunter: []
intelx: []
leakix: []
netlas: []
passivetotal: []
quake: []
redhuntlabs: [https://reconapi.redhuntlabs.com/community/v1/domains/subdomains:KEY_HERE]
robtex: []
securitytrails: []
shodan: []
threatbook: []
virustotal: []
whoisxmlapi: []
zoomeyeapi: []
dogancanbakir commented 10 months ago

Closing this. Feel free to reopen if the issue persists.