LinkFinder icon indicating copy to clipboard operation
LinkFinder copied to clipboard

DeprecationWarning: ssl.PROTOCOL_TLSv1_2

Open okondo-afo opened this issue 2 years ago • 11 comments

linkfinder returns this output

/LinkFinder/linkfinder.py:133: DeprecationWarning: ssl.PROTOCOL_TLSv1_2 is deprecated sslcontext = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2) cat: standard output: Bad file descriptor

okondo-afo avatar Jun 01 '22 20:06 okondo-afo

Yeah, ssl.PROTOCOL_TLSv1_2 is deprecated. Referring to https://docs.python.org/3/library/ssl.html#client-side-operation, update those line with: sslcontext = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) sslcontext.load_verify_locations("/etc/ssl/certs/ca-bundle.crt")

I didn't have that cert. But cert from ncat work fine. I'm using /usr/share/ncat/ca-bundle.crt

pro7357 avatar Jun 21 '22 10:06 pro7357

above thing didn't work for me

abhinavsaraswatt avatar Aug 21 '22 20:08 abhinavsaraswatt

python -W ignore foo.py

gprime31 avatar Sep 04 '22 17:09 gprime31

for MacOS this worked for me sslcontext = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) sslcontext.load_verify_locations("/usr/local/Cellar/nmap/7.92/share/ncat/ca-bundle.crt")

Incend1um avatar Sep 05 '22 12:09 Incend1um

python -W ignore foo.py

This works for me!

abhinavsaraswatt avatar Sep 06 '22 04:09 abhinavsaraswatt

python -W ignore foo.py

thx, workd fine

c4ir0 avatar Oct 16 '22 01:10 c4ir0

guys i am a little beginner here could someone please help me a bit more clear on how to clear this issue LinkFinder/linkfinder.py:133: DeprecationWarning: ssl.PROTOCOL_TLSv1_2 is deprecated sslcontext = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)

Harish-GK avatar Jan 11 '23 20:01 Harish-GK

guys i am a little beginner here could someone please help me a bit more clear on how to clear this issue LinkFinder/linkfinder.py:133: DeprecationWarning: ssl.PROTOCOL_TLSv1_2 is deprecated sslcontext = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)

python -W ignore linkfinder.py

c4ir0 avatar Jan 11 '23 20:01 c4ir0

This issue was fixed by the pull request update for latest #133 . Change the old depreciated function as per this Files changed:- try: sslcontext = ssl.create_default_context() response = urlopen(q, timeout=args.timeout, context=sslcontext) except: sslcontext = ssl.create_default_context() response = urlopen(q, timeout=args.timeout, context=sslcontext)

This issue can close now.

Archurcl4w avatar Mar 04 '23 04:03 Archurcl4w

This issue was fixed by the pull request update for latest #133 . Change the old depreciated function as per this Files changed:- try: sslcontext = ssl.create_default_context() response = urlopen(q, timeout=args.timeout, context=sslcontext) except: sslcontext = ssl.create_default_context() response = urlopen(q, timeout=args.timeout, context=sslcontext)

This issue can close now.

It worked perfectly here. Thanks!

L3V14TH4N avatar Apr 22 '23 14:04 L3V14TH4N

I change urlopen to requests lib then it works well

bugoverfl0w avatar May 18 '23 01:05 bugoverfl0w