Add JSONWriter, Fix CVE sort order of report

This commit is contained in:
kota kanbe
2016-05-28 11:22:45 +09:00
parent 150b1c2406
commit 54d6217b93
12 changed files with 135 additions and 57 deletions

View File

@@ -98,7 +98,8 @@ func (s CvePacksList) Swap(i, j int) {
// Less implement Sort Interface
func (s CvePacksList) Less(i, j int) bool {
return s[i].CveDetail.CvssScore("en") > s[j].CveDetail.CvssScore("en")
return s[i].CveDetail.CvssScore(config.Conf.Lang) >
s[j].CveDetail.CvssScore(config.Conf.Lang)
}
func detectOS(c config.ServerInfo) (osType osTypeInterface) {