projectdiscovery / subfinder

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

Better error handling #157

Closed amalmurali47 closed 4 years ago

amalmurali47 commented 5 years ago

What's the problem (or question)?

I would prefer a less-detailed, and better-formatted error message in case of failures/exceptions.

How can we reproduce the issue?

When you run subfinder with subfinder -d domain.com, you might sometimes see the following errors:

Running enumeration on domain.com

dnsdb: Unexpected return status 503

crtsh: json: cannot unmarshal array into Go value of type crtsh.crtshObject

dnsdumpster: Post https://dnsdumpster.com: net/http: TLS handshake timeout

archiveis: Get http://archive.is/*.domain.com: dial tcp 172.16.16.16:80: connect: operation timed out

waybackarchive: unexpected EOF

sitedossier: net/http: request canceled (Client.Timeout exceeded while reading body)

baidu: net/http: request canceled (Client.Timeout exceeded while reading body)

Most people don't care about these messages. The ones that do can enable the verbose mode and get the detailed messages. I would suggest improving the way the information gathering phase is currently presented.

While a source is being processed, you can show a loading animation with an ASCII spinner. Something like this might work. Once the processing is over for a source, you can display a tick or an X mark based on the status.

Running Source: Ask                               [✓]    
Running Source: Archive.is                        [✓]    
[...]
Running Source: WaybackArchive                    [✘]             
Running Source: Yahoo                             [✓]                    

What are the running context details?

Ice3man543 commented 5 years ago

Hi @amalmurali47 , This is a very good issue, I've just got the time to work on this project, will keep you updated about new developments.

Thanks for this.

Ice3man543 commented 4 years ago

Hey, hopefully this has been fixed in the latest edition. Check it out!