mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-26 12:57:50 +08:00
模块优化
This commit is contained in:
@@ -23,9 +23,10 @@ class CheckCert(Module):
|
|||||||
"""
|
"""
|
||||||
获取域名证书并匹配证书中的子域名
|
获取域名证书并匹配证书中的子域名
|
||||||
"""
|
"""
|
||||||
ctx = ssl.create_default_context()
|
|
||||||
sock = ctx.wrap_socket(socket.socket(), server_hostname=self.domain)
|
|
||||||
try:
|
try:
|
||||||
|
ctx = ssl.create_default_context()
|
||||||
|
sock = ctx.wrap_socket(socket.socket(),
|
||||||
|
server_hostname=self.domain)
|
||||||
sock.connect((self.domain, self.port))
|
sock.connect((self.domain, self.port))
|
||||||
cert_dict = sock.getpeercert()
|
cert_dict = sock.getpeercert()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user