Land #5915, fix a warning with the regex

bug/bundler_fix
HD Moore 2015-09-01 23:08:01 -05:00
commit 347698e93f
No known key found for this signature in database
GPG Key ID: 7549FB3DB1DD1F32
1 changed files with 1 additions and 3 deletions

View File

@ -43,8 +43,6 @@ class Metasploit3 < Msf::Auxiliary
print_status("#{ip} No certificate subject or CN found") print_status("#{ip} No certificate subject or CN found")
return return
end end
issuer_pattern = Regexp.new(datastore['ISSUER'], [Regexp::EXTENDED, 'n'])
sub = cert.subject.to_a sub = cert.subject.to_a
before = Time.parse("#{cert.not_before}") before = Time.parse("#{cert.not_before}")
@ -61,7 +59,7 @@ class Metasploit3 < Msf::Auxiliary
end end
end end
if ( "#{cert.issuer}" !~ /#{issuer_pattern}/) if cert.issuer.to_s !~ /#{datastore['ISSUER']}/n
print_good("#{ip} - '#{vhostn}' : #{cert.issuer} (BAD ISSUER)" ) print_good("#{ip} - '#{vhostn}' : #{cert.issuer} (BAD ISSUER)" )
elsif datastore['SHOWALL'] elsif datastore['SHOWALL']
# show verbose as status # show verbose as status