GerbenJavado / LinkFinder

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

invalid input defined or SSL error: 'module' object has no attribute 'PROTOCOL_TLSv1_2' #42

Closed irshad9998 closed 5 years ago

irshad9998 commented 6 years ago

Hey,

I got this error invalid input defined or SSL error: 'module' object has no attribute 'PROTOCOL_TLSv1_2'.

root@localhost:~/Documents/LinkFinder# python linkfinder.py -i https://example.com -d Usage: python linkfinder.py [Options] use -h for help Error: invalid input defined or SSL error: 'module' object has no attribute 'PROTOCOL_TLSv1_2' Regards

GerbenJavado commented 6 years ago

@irshad9998 Thanks for reporting! I'll look into it.

Bankde commented 5 years ago

I have noticed we're using low level urllib. Should we use python Requests instead ? Requests lib might handle that for us.

gh0stkey commented 5 years ago

Hey,man.I think i have the same problem as you,but i fixed it. You can change the code of linkfinder.py. Original Code:

sslcontext = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)

...code

response = urlopen(q, context=sslcontext)

After the change of code:

# Support websites that force TLSv1.2

...code

try:
    sslcontext = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
    response = urlopen(q, context=sslcontext)
except:
    sslcontext = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
    response = urlopen(q, context=sslcontext)
GerbenJavado commented 5 years ago

I swapped out requests originally because it gave very bad performance. (some problems with using it for very large textfiles in combination with file://)

GerbenJavado commented 5 years ago

@gh0stkey Thank you so much for the suggestion. Ill try it out and add it to LinkFinder.

pcastagnaro commented 5 years ago

Hi guys,

I am getting a similar error: urlopen error [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:727). How can I repair it?

Thanks!

ysl4life commented 4 years ago

also having the same issue still, even with the new version with the fix from @gh0stkey

Syazvinski commented 2 years ago

still having the issue here

Bankde commented 2 years ago

@Syazvinski Can we have the error message, and (if you could) step to reproduce and the website you're testing?

ghost-man01 commented 1 year ago

Hey I'm getting the same issue of sslcontext.