Fix several minor details

GSoC/Meterpreter_Web_Console
Agora Security 2018-07-10 23:56:05 -04:00
parent 66c207a124
commit 9491c63778
1 changed files with 3 additions and 5 deletions

View File

@ -27,7 +27,7 @@ class MetasploitModule < Msf::Auxiliary
res = send_request_cgi({
'uri' => normalize_uri(datastore['URI'], "/version"),
'method' => 'GET'})
if not res or res.code != 200
if res.nil? || res.code != 200
print_error("[Docker Version] failed to identify version")
return
end
@ -36,13 +36,11 @@ class MetasploitModule < Msf::Auxiliary
end
def parse_body(body)
result = JSON.parse(body)
print_status("Identifying Docker Server Version on #{rhost}:#{rport}")
result = res.get_json_document
print_status("Identifying Docker Server Version on #{ip}:#{rport}")
print_good("[Docker Server] Version: #{result['Version']}")
if datastore['VERBOSE']
print_status ("All info: #{result.to_s}")
end
return
end
end