Modify check logic

This commit is contained in:
Jacob Robles 2018-11-29 10:04:05 -06:00
parent 5180ec4cf8
commit 8508824cc2
No known key found for this signature in database
GPG Key ID: 3EC9F18F2B12401C
1 changed files with 2 additions and 3 deletions

View File

@ -102,14 +102,13 @@ class MetasploitModule < Msf::Exploit::Remote
end
res_json = res.get_json_document
@version = res_json['serverSparkVersion']
if res_json.empty? || res_json['serverSparkVersion'].nil?
if @version.nil?
vprint_bad("#{peer} - Cannot parse the response, seems like it's not Spark REST API.")
return false
end
@version = res_json['serverSparkVersion']
true
end