database host info from post modules

GSoC/Meterpreter_Web_Console
h00die 2018-10-17 12:43:05 -04:00
parent 786629afc9
commit e78b760678
3 changed files with 26 additions and 1 deletions

View File

@ -99,6 +99,13 @@ module System
system_data[:version] = ''
end
report_host({
:host => rhost,
:os_name => system_data[:distro],
:os_flavor => system_data[:version]
})
return system_data
end
@ -148,7 +155,9 @@ module System
# @return [String]
#
def get_hostname
cmd_exec('uname -n').to_s
hostname = cmd_exec('uname -n').to_s
report_host({:host => rhost, :name => hostname})
rescue
raise 'Unable to retrieve hostname'
end

View File

@ -17,6 +17,13 @@ module Msf::Post::OSX::System
system_info["Kernel"] = cmd_exec("uname -a")
system_info["Hostname"] = system_info["Kernel"].split(" ")[1]
report_host({
:host => rhost,
:os_name => 'osx',
:os_flavor => system_data["Kernel"],
:name => system_info["Hostname"]
})
return system_info
end

View File

@ -22,6 +22,15 @@ module System
system_data[:version] = version
system_data[:kernel] = kernel_version
system_data[:hostname] = kernel_version.split(" ")[1]
host_info = {
:host => rhost,
:os_name => 'Solaris',
:name => system_data[:hostname]
}
if system_data[:version] =~ /([\d]?\d\.\d)/
host_info[:os_flavor] = $1
end
report_host(host_info)
return system_data
end