Skip to content

Commit

Permalink
Merge pull request #13 from yakmannski/patch-1
Browse files Browse the repository at this point in the history
Update xml.go
  • Loading branch information
s0md3v authored Apr 21, 2022
2 parents 3914555 + ca23038 commit fc4426b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions internal/output/xml.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ func portToXML(port g.Port, result g.Output) string {
if port.Version != "" {
thisString += fmt.Sprintf(` version="%s"`, port.Version)
}
if port.Product != "" {
thisString += fmt.Sprintf(` product="%s"`, port.Product)
}
if result.OS.Port == port.Port {
thisString += fmt.Sprintf(` ostype="%s" method="probed" conf="8">`, result.OS.Name)
} else if strings.HasSuffix(port.Service, "?") {
Expand All @@ -57,8 +54,9 @@ func portToXML(port g.Port, result g.Output) string {
for _, cpe := range port.Cpes {
thisString += fmt.Sprintf(`<cpe>%s</cpe>`, cpe)
}
thisString += "</service></port>\n"
thisString += "</service>"
}
thisString += "</port>\n"
return thisString
}

Expand Down

0 comments on commit fc4426b

Please sign in to comment.