File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed
modules/auxiliary/scanner/http Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -53,13 +53,7 @@ def run_host(ip)
53
53
print_status ( "#{ ip } :#{ rport } Subject: #{ cert . subject } " )
54
54
print_status ( "#{ ip } :#{ rport } Issuer: #{ cert . issuer } " )
55
55
print_status ( "#{ ip } :#{ rport } Signature Alg: #{ cert . signature_algorithm } " )
56
- public_key = cert . public_key . to_pem ( )
57
- # removing header and footer
58
- public_key = public_key . sub ( "-----BEGIN RSA PUBLIC KEY-----" , "" )
59
- public_key = public_key . sub ( "-----END RSA PUBLIC KEY-----" , "" )
60
- public_key_size = Rex ::Text . decode_base64 ( public_key ) . size
61
- # removing 12 bytes for some shmoo of exponent and modulus and turn bytes into bits
62
- public_key_size = ( public_key_size - 12 ) * 8
56
+ public_key_size = cert . public_key . n . num_bytes * 8
63
57
print_status ( "#{ ip } :#{ rport } Public Key Size: #{ public_key_size } bits" )
64
58
print_status ( "#{ ip } :#{ rport } Not Valid Before: #{ cert . not_before } " )
65
59
print_status ( "#{ ip } :#{ rport } Not Valid After: #{ cert . not_after } " )
You can’t perform that action at this time.
0 commit comments