Skip to content

Instantly share code, notes, and snippets.

View wegenerx's full-sized avatar

alterW wegenerx

View GitHub Profile
@pk5ls20
pk5ls20 / ssl_context.py
Created May 25, 2024 21:22
Normally access files under `https://multimedia.nt.qq.com.cn` using aiohttp
# Tested On Python3.11.9 + OpenSSL 3.1.4 Oct 2023
import ssl
SSL_CONTEXT = ssl.create_default_context()
SSL_CONTEXT.set_ciphers('DEFAULT')
SSL_CONTEXT.options |= ssl.OP_NO_SSLv2
SSL_CONTEXT.options |= ssl.OP_NO_SSLv3
SSL_CONTEXT.options |= ssl.OP_NO_TLSv1
SSL_CONTEXT.options |= ssl.OP_NO_TLSv1_1
SSL_CONTEXT.options |= ssl.OP_NO_COMPRESSION