Modify check logic
This commit is contained in:
parent
5180ec4cf8
commit
8508824cc2
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue