Simplify the module greatly

GSoC/Meterpreter_Web_Console
Agora Security 2018-07-11 00:15:56 -04:00
parent ffc2f044cc
commit 5a89642ddd
1 changed files with 1 additions and 5 deletions

View File

@ -23,17 +23,13 @@ class MetasploitModule < Msf::Auxiliary
def run_host(ip)
res = send_request_cgi({
'uri' => normalize_uri(datastore['URI'], "/version"),
'uri' => normalize_uri("/version"),
'method' => 'GET'})
if res.nil? || res.code != 200
print_error("[Docker Version] failed to identify version")
return
end
parse_body(res.body)
end
def parse_body(body)
result = res.get_json_document
print_status("Identifying Docker Server Version on #{ip}:#{rport}")
print_good("[Docker Server] Version: #{result['Version']}")