use the regex source when generating or displaying a regex

This commit is contained in:
Brent Cook 2016-07-11 22:05:50 -05:00
parent 79fd648bbe
commit 128f802928
2 changed files with 3 additions and 3 deletions

View File

@ -59,7 +59,7 @@ class MetasploitModule < Msf::Auxiliary
end end
end end
if cert.issuer.to_s !~ /#{datastore['ISSUER']}/n if cert.issuer.to_s !~ /#{datastore['ISSUER'].source}/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

View File

@ -82,7 +82,7 @@ class MetasploitModule < Msf::Auxiliary
nbnsq_type = packet[46..47] nbnsq_type = packet[46..47]
nbnsq_class = packet[48..49] nbnsq_class = packet[48..49]
return unless nbnsq_decodedname =~ /#{datastore['REGEX']}/i return unless nbnsq_decodedname =~ /#{datastore['REGEX'].source}/i
vprint_good("#{rhost.ljust 16} nbns - #{nbnsq_decodedname} matches regex, responding with #{spoof}") vprint_good("#{rhost.ljust 16} nbns - #{nbnsq_decodedname} matches regex, responding with #{spoof}")
@ -165,7 +165,7 @@ class MetasploitModule < Msf::Auxiliary
end end
} }
print_status("NBNS Spoofer started. Listening for NBNS requests with REGEX \"#{datastore['REGEX']}\" ...") print_status("NBNS Spoofer started. Listening for NBNS requests with REGEX \"#{datastore['REGEX'].source}\" ...")
self.thread.join self.thread.join
print_status("NBNS Monitor thread exited...") print_status("NBNS Monitor thread exited...")