CPE 2.2 & 2.3 Support
Full support for both CPE 2.2 and 2.3 formats with parsing and generation capabilities
A comprehensive Go library for parsing, matching, and managing CPE (Common Platform Enumeration) information
Install the library:
go get github.com/scagogogo/cpe
Parse a CPE string:
package main
import (
"fmt"
"log"
"github.com/scagogogo/cpe"
)
func main() {
// Parse CPE 2.3 format
cpeObj, err := cpe.ParseCpe23("cpe:2.3:a:microsoft:windows:10:*:*:*:*:*:*:*")
if err != nil {
log.Fatal(err)
}
fmt.Printf("Vendor: %s\n", cpeObj.Vendor)
fmt.Printf("Product: %s\n", cpeObj.ProductName)
fmt.Printf("Version: %s\n", cpeObj.Version)
}
Last updated: $(date)