GerbenJavado / LinkFinder

A python script that finds endpoints in JavaScript files
https://gerbenjavado.com/discovering-hidden-content-using-linkfinder
MIT License
3.7k stars 595 forks source link

Script stops abruptly if SSL error is encountered #38

Closed amalmurali47 closed 6 years ago

amalmurali47 commented 6 years ago

Line 280-281 has:

except Exception as e:
     parser_error("invalid input defined or SSL error: %s" % e)

And parser_error() calls sys.exit().

This causes the following loop to terminate the execution mid-way, leaving the remaining endpoints unprocessed:

if args.domain:
    for endpoint in endpoints:

        <snipped>

        except Exception as e:
            parser_error("invalid2 input defined or SSL error: %s" % e)
        print("")

I'm not sure if this is intended behaviour - thought I'd just report the issue. Feel free to close this if you think it's not something that needs to be fixed.

Cheers, Amal

GerbenJavado commented 6 years ago

Hi Amal,

This is actually a very interesting point you raise. Indeed when going over a bunch of domains one shouldn't trip up the entire process. I'll think about a good solution.

Regards, Gerben

GerbenJavado commented 6 years ago

Should be fixed in https://github.com/GerbenJavado/LinkFinder/commit/a96e7d6203e3b28869f0b4d09905831a9b360193. I decided on a simple fix which uses a custom error message without the sys.exit(). Thanks for reporting.