INNER CODE UNIT · Go
buildTechnologyVersions
projectdiscovery/httpx · runner/cpe.go:360
func buildTechnologyVersions(technologies []string) []technologyVersion {
candidates := make([]technologyVersion, 0, len(technologies))
for _, tech := range technologies {
parts := strings.SplitN(tech, ":", 2)
if len(parts) != 2 {
continue
}
version := strings.TrimSpace(parts[1])
if version == "" {
continue
}
tokens := technologyTokens(parts[0])
if len(tokens) == 0 {
continue
}
candidates = append(candidates, technologyVersion{version: version, tokens: tokens})
}
return candidates