代码拉取完成,页面将自动刷新
from info import *
from getkeys import *
# messages
# (ClientHello||ServerHello||
# Hash(ServerCertificate)||
# Hash(ClientCertificate)||
# CertificateVerify||ClientKeyExchange);
messages = []
if __name__ == '__main__':
info = Info()
client_hello = info.build_client_hello()
server_hello = info.build_server_hello()
with open('RSA_public_key_server.pem', 'r') as f:
public_key_bin = f.read().encode()
server_certificate = info.build_server_certificate(public_key_bin)
client_certificate = info.build_client_certificate(public_key_bin)
key_client = RSA.import_key(open('RSA_private_key_client.pem').read())
certificate_verify = info.build_certificate_verify(key_client, client_hello, server_hello, server_certificate)
key_server = RSA.import_key(open('RSA_public_key_server.pem').read())
client_key_exchange = info.build_client_key_exchange(key_server)
messages.append(client_hello)
messages.append(server_hello)
messages.append(server_certificate)
messages.append(client_certificate)
messages.append(certificate_verify)
messages.append(client_key_exchange)
server_finished = info.build_server_finished(messages, client_key_exchange[3:])
client_finished=info.build_client_finished(messages, client_key_exchange[3:])
error_message=info.build_error_message(0x01.to_bytes(1,'big'))
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。