add version and hostname to cisco config parser

GSoC/Meterpreter_Web_Console
h00die 2018-10-16 15:02:42 -04:00
parent 4a06fe1d4b
commit 32f4e2c9a0
1 changed files with 16 additions and 0 deletions

View File

@ -55,9 +55,25 @@ module Auxiliary::Cisco
tuniface = nil
host_info = {
:host => thost,
:os_name => 'Cisco',
}
report_host(host_info)
config.each_line do |line|
case line
#
# Cover host details
#
when /^version (\d\d)\.(\d)/i
host_info[:os_name] = "Cisco IOS #{$1}"
host_info[:os_sp] = $2
report_host(host_info)
when /^hostname (\S+)/i
host_info[:name] = $1
report_host(host_info)
#
# Enable passwords
#
when /^\s*enable (password|secret) (\d+) (.*)/i