Skip to content

Commit 67b4675

Browse files
committed
comply to code conventions
1 parent 94fdd4c commit 67b4675

File tree

1 file changed

+5
-4
lines changed
  • modules/auxiliary/scanner/http

1 file changed

+5
-4
lines changed

modules/auxiliary/scanner/http/ssl.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,14 @@ def run_host(ip)
5353
print_status("#{ip}:#{rport} Subject: #{cert.subject}")
5454
print_status("#{ip}:#{rport} Issuer: #{cert.issuer}")
5555
print_status("#{ip}:#{rport} Signature Alg: #{cert.signature_algorithm}")
56-
public_key = cert.public_key.to_pem()
56+
public_key = cert.public_key.to_pem()
5757
# removing header and footer
5858
public_key = public_key.sub("-----BEGIN RSA PUBLIC KEY-----","")
5959
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
62-
print_status("#{ip}:#{rport} Public Key Size: #{(public_key_size - 12) * 8} bits")
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
63+
print_status("#{ip}:#{rport} Public Key Size: #{public_key_size} bits")
6364
print_status("#{ip}:#{rport} Not Valid Before: #{cert.not_before}")
6465
print_status("#{ip}:#{rport} Not Valid After: #{cert.not_after}")
6566

0 commit comments

Comments
 (0)