add version and hostname to cisco config parser
parent
4a06fe1d4b
commit
32f4e2c9a0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue