Method: Rex::Post::Meterpreter::ClientCore#enable_ssl_hash_verify
- Defined in:
- lib/rex/post/meterpreter/client_core.rb
#enable_ssl_hash_verify ⇒ Object
Enable the SSL certificate has verificate
386 387 388 389 390 391 392 393 394 395 396 397 398 |
# File 'lib/rex/post/meterpreter/client_core.rb', line 386 def enable_ssl_hash_verify # Not supported unless we have a socket with SSL enabled return nil unless self.client.sock.type? == 'tcp-ssl' request = Packet.create_request('core_transport_setcerthash') hash = Rex::Text.sha1_raw(self.client.sock.sslctx.cert.to_der) request.add_tlv(TLV_TYPE_TRANS_CERT_HASH, hash) client.send_request(request) return hash end |