This commit is contained in:
crusader 2018-10-23 14:01:43 +09:00
parent f77713de2a
commit 00c0146fba

View File

@ -25,7 +25,12 @@ func (m *SSHMatcher) Vendor(matchCtx *osm.MatchCtx) string {
}
func (m *SSHMatcher) Version(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
v := "UNKNOWN"
if _v, ok := matchCtx.GetAttribute("softwareversion"); ok {
v = _v
}
return v
}
func (m *SSHMatcher) OsType(matchCtx *osm.MatchCtx) string {
@ -38,9 +43,6 @@ func (m *SSHMatcher) OsVersion(matchCtx *osm.MatchCtx) string {
func (m *SSHMatcher) Name(matchCtx *osm.MatchCtx) string {
name := "SSH"
if v, ok := matchCtx.GetAttribute("softwareversion"); ok {
name = name + " (" + v + ")"
}
return name
}