hi, i use wappalyzergo as library,the fingerprints_data.json file is bound to the repo code. When I update the json file, I need to update the whole golang project, I think it would be nice to have a function on the Wappalyze object to define fingerprints, In this way, when used as a function library, it avoids constantly updating the entire project code in order to update the data file
// now I use some tricks to solve this problem
// the wappalyzerFileBytes define from outter resource, such as cloud object storage service
//go:linkname compileFingerprint github.com/projectdiscovery/wappalyzergo.compileFingerprint
func compileFingerprint(fingerprint *wappalyzer.Fingerprint) *wappalyzer.CompiledFingerprint
type WappalyzeWithUnsafe struct {
fingerprints unsafe.Pointer
}
func NewWappalyzerClient() *wappalyzer.Wappalyze {
EnsureWappalyzerFile()
wappalyzerClient := new(wappalyzer.Wappalyze)
wappalyzerClientCompiledFingerprints := &wappalyzer.CompiledFingerprints{
Apps: make(map[string]*wappalyzer.CompiledFingerprint),
}
var fingerprintsStruct wappalyzer.Fingerprints
json.Unmarshal([]byte(wappalyzerFileBytes), &fingerprintsStruct)
for i, fingerprint := range fingerprintsStruct.Apps {
wappalyzerClientCompiledFingerprints.Apps[i] = compileFingerprint(fingerprint)
}
wappalyzeUnsafe := (*WappalyzeWithUnsafe)(unsafe.Pointer(wappalyzerClient))
wappalyzeUnsafe.fingerprints = unsafe.Pointer(wappalyzerClientCompiledFingerprints)
return wappalyzerClient
}
hi, i use wappalyzergo as library,the fingerprints_data.json file is bound to the repo code. When I update the json file, I need to update the whole golang project, I think it would be nice to have a function on the Wappalyze object to define fingerprints, In this way, when used as a function library, it avoids constantly updating the entire project code in order to update the data file