From 381297ba93c912746f41813df6d6b1a989747869 Mon Sep 17 00:00:00 2001 From: HD Moore Date: Tue, 1 Sep 2015 23:07:48 -0500 Subject: [PATCH] Fix the regex flags --- modules/auxiliary/scanner/http/cert.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/auxiliary/scanner/http/cert.rb b/modules/auxiliary/scanner/http/cert.rb index 07eb621360..167bb24fc9 100644 --- a/modules/auxiliary/scanner/http/cert.rb +++ b/modules/auxiliary/scanner/http/cert.rb @@ -43,8 +43,6 @@ class Metasploit3 < Msf::Auxiliary print_status("#{ip} No certificate subject or CN found") return end - - issuer_pattern = Regexp.new(datastore['ISSUER']) sub = cert.subject.to_a before = Time.parse("#{cert.not_before}") @@ -61,7 +59,7 @@ class Metasploit3 < Msf::Auxiliary end end - if ( "#{cert.issuer}" !~ /#{issuer_pattern}/) + if cert.issuer.to_s !~ /#{datastore['ISSUER']}/n print_good("#{ip} - '#{vhostn}' : #{cert.issuer} (BAD ISSUER)" ) elsif datastore['SHOWALL'] # show verbose as status