修改fastscan

This commit is contained in:
song 2023-03-07 17:08:20 +08:00
parent e8a4c34e77
commit f63825aac1
1 changed files with 5 additions and 5 deletions

View File

@ -15,7 +15,7 @@ import (
var (
dbhostsip = "172.17.20.121:3306"
dbusername = "root"
dbpassword = "Kylin123-"
dbpassword = ""
dbname = "kylincve"
)
@ -41,11 +41,11 @@ func StrTrimSpace(v1str,v2str string )(v1,v2 string ){
func comparSlice(v1slice,v2slice []string )int{
for index,_ :=range v1slice{
if v1slice[index] > v2slice[index]{
fmt.Println(1111,v1slice[index],v2slice[index])
// fmt.Println(1111,v1slice[index],v2slice[index])
return version1
}
if v1slice[index] < v2slice[index]{
fmt.Println(v1slice[index],v2slice[index])
// fmt.Println(v1slice[index],v2slice[index])
return version2
}
if len(v1slice)-1 == index {
@ -176,8 +176,8 @@ func PushCompareVersion(cve_no string,dpkgInfoStr string,ubuntu_v10_1_edition st
}
v2 := strings.ReplaceAll(ubuntu_v10_1_edition, "ubuntu", ".")
v2 = strings.ReplaceAll(v2, "kylin", ".")
v1="2.2.10-3.2"
v2="2.2.8-1.1"
// v1="2.2.10-3.2"
// v2="2.2.8-1.1"
result=compareStrVer(v1,v2)
return result