Skip to content

Commit bf731b4

Browse files
committed
look before leap issues
1 parent 56e95f1 commit bf731b4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/msf/core/post/linux/system.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,18 @@ def get_sysinfo
8686
version = read_file("/etc/gentoo-release").gsub(/\n|\\n|\\l/,'')
8787
system_data[:distro] = "gentoo"
8888
system_data[:version] = version
89-
else
9089

91-
# Others
90+
# Generic
91+
elsif etc_files.include?("issue")
9292
version = read_file("/etc/issue").gsub(/\n|\\n|\\l/,'')
9393
system_data[:distro] = "linux"
9494
system_data[:version] = version
95+
96+
# Others, could be a mismatch like ssh_login to cisco device
97+
else
98+
system_data[:distro] = "linux"
99+
system_data[:version] = ''
100+
95101
end
96102
return system_data
97103
end

0 commit comments

Comments
 (0)