We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bfadfda commit 77efa7cCopy full SHA for 77efa7c
modules/auxiliary/server/browser_autopwn.rb
@@ -831,15 +831,13 @@ def build_script_response(cli, request)
831
# Example: :os_name => ( 'Windows' | /Windows/ | ['Windows', 'Mac OS X'] )
832
#
833
def client_matches_module_spec?(client_str, module_spec)
834
- if module_spec.kind_of?(::String)
835
- return !! (client_str == module_spec)
836
- end
837
838
- if module_spec.kind_of?(::Regexp)
+ case module_spec
+ when kind_of? ::String
+ return !! (client_str == module_spec)
+ when kind_of? ::Regexp
839
return !! client_str.match(module_spec)
840
841
-
842
- if module_spec.kind_of?(::Array)
+ when kind_of? ::Array
843
return !! exploit_spec.map{ |spec|
844
client_matches_module_spec?(client_str, spec)
845
}.include?(true)
0 commit comments