From 32f4e2c9a0c480df174616f747f2c721af0e3964 Mon Sep 17 00:00:00 2001 From: h00die Date: Tue, 16 Oct 2018 15:02:42 -0400 Subject: [PATCH] add version and hostname to cisco config parser --- lib/msf/core/auxiliary/cisco.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/msf/core/auxiliary/cisco.rb b/lib/msf/core/auxiliary/cisco.rb index 3015be4299..33390a5cf2 100644 --- a/lib/msf/core/auxiliary/cisco.rb +++ b/lib/msf/core/auxiliary/cisco.rb @@ -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