Giter Club home page Giter Club logo

ssl-context-configurator's People

Contributors

ramikg avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

ssl-context-configurator's Issues

More example ?

Hi, can you provide more working examples because I used the example code from code page and got this error:

Traceback (most recent call last):
  File "C:\Python38\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "C:\Python38\lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request
    self._validate_conn(conn)
  File "C:\Python38\lib\site-packages\urllib3\connectionpool.py", line 1040, in _validate_conn
    conn.connect()
  File "C:\Python38\lib\site-packages\urllib3\connection.py", line 414, in connect
    self.sock = ssl_wrap_socket(
  File "C:\Python38\lib\site-packages\urllib3\util\ssl_.py", line 454, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(
  File "C:\Python38\lib\site-packages\urllib3\util\ssl_.py", line 498, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
  File "C:\Python38\lib\ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "C:\Python38\lib\ssl.py", line 1040, in _create
    self.do_handshake()
  File "C:\Python38\lib\ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1131)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Deve\BypassTlsFing\ssl-context-configurator-master\test.py", line 55, in <module>
    r = p.request('GET', 'https://tools.scrapfly.io/api/fp/ja3?extended=1')
  File "C:\Python38\lib\site-packages\urllib3\request.py", line 74, in request
    return self.request_encode_url(
  File "C:\Python38\lib\site-packages\urllib3\request.py", line 96, in request_encode_url
    return self.urlopen(method, url, **extra_kw)
  File "C:\Python38\lib\site-packages\urllib3\poolmanager.py", line 376, in urlopen
    response = conn.urlopen(method, u.request_uri, **kw)
  File "C:\Python38\lib\site-packages\urllib3\connectionpool.py", line 813, in urlopen
    return self.urlopen(
  File "C:\Python38\lib\site-packages\urllib3\connectionpool.py", line 813, in urlopen
    return self.urlopen(
  File "C:\Python38\lib\site-packages\urllib3\connectionpool.py", line 813, in urlopen
    return self.urlopen(
  File "C:\Python38\lib\site-packages\urllib3\connectionpool.py", line 785, in urlopen
    retries = retries.increment(
  File "C:\Python38\lib\site-packages\urllib3\util\retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='tools.scrapfly.io', port=443): Max retries exceeded with url: /api/fp/ja3?extended=1 (Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_HAND
SHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1131)')))

import urllib3
from ssl_context_configurator import SSLContextConfigurator

ssl_context = urllib3.util.ssl_.create_urllib3_context()

with SSLContextConfigurator(ssl_context, libssl_path='libssl.so') as ssl_context_configurator:
    ssl_context_configurator.configure_signature_algorithms('ECDSA+SHA256')

pool_manager = urllib3.PoolManager(cert_reqs='CERT_NONE', ssl_context=ssl_context)
pool_manager.request('GET', 'https://tools.scrapfly.io/api/fp/ja3?extended=1')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.