Global monkey patching the python ssl module

05-11-2025

def patched_create_default_context(*args, **kwargs):
    ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
    ctx.check_hostname = False
    ctx.verify_mode = ssl.CERT_NONE
    return ctx
 
ssl.create_default_context = patched_create_default_context