Skip to content
Discussion options

You must be logged in to vote

aiohttp的话,不介意的话可以使用http拉取multimedia.nt.qq.com.cn下的图片,或者修改SSL_CONTEXT也可以
可以参考下我的修改:gist.github.com/pk5ls20/a2ded67daf09b38458d7d56e4c30b53f

只用 set_ciphers 就能解决问题, 但如果只禁用 SSL 和低版本 TLS 就没有效果, 有点奇怪

import ssl
import socket


def verify_ssl(hostname: str, port: int = 443):
    context = ssl.create_default_context()
    context.set_ciphers('AES')

    with socket.create_connection((hostname, port)) as sock:
        with context.wrap_socket(sock, server_hostname=hostname) as ssock:
            print(ssock.cipher())
            print(ssock.version())


verify_ssl('multimedia.nt.qq.com.cn')

通过

('AES128-GCM-SHA256', 'TLSv1.2', 128)
TLSv1.2

省流 x1:

NoneBot2用户可以使用 NoneBot插件 lgc-NB2Dev/nonebot-plu…

Replies: 17 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by pk5ls20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
wontfix This will not be worked on bug? Maybe it's a bug
7 participants
Converted from issue

This discussion was converted from issue #315 on May 26, 2025 13:15.