def configure_client_socket(self):
"""This is the socket from mallory to the victim"""
self.log.debug("SSLProto: Getting common name from socket")
# Destination is an ssl socket to the server.
cert_from_remote_server = self.destination.getpeercert(True)
# fake_key is the private key and we need to store it somewhere.
fake_cert, fake_key = cert_auth.ca.get_fake_cert_and_key_filename(cert_from_remote_server)
self.log.debug("SSLProtocol: private key" + fake_key)
self.log.debug("SSLProto: Starting Socket")
try:
self.source = ssl.wrap_socket(self.source,
server_side=True,
certfile=fake_cert,
keyfile=fake_key,
ssl_version=ssl.PROTOCOL_SSLv23)
except:
self.log.debug("SSLProto: Client Closed SSL Connection")
traceback.print_exc()
self.log.debug("SSLProto: WoWzer!!")
评论列表
文章目录