MCPcopy Create free account
hub / github.com/chainreactors/spray / LoadFoundKeys

Function LoadFoundKeys

pkg/load.go:176–196  ·  view source on GitHub ↗

LoadFoundKeys loads embedded found/keys templates (credential detection).

()

Source from the content-addressed store, hash-verified

174
175// LoadFoundKeys loads embedded found/keys templates (credential detection).
176func LoadFoundKeys() error {
177 keysData := LoadConfig("found_keys")
178 if len(keysData) == 0 {
179 return nil
180 }
181
182 var templates []interface{}
183 if err := yaml.Unmarshal(keysData, &templates); err != nil {
184 return err
185 }
186
187 docs := make([][]byte, 0, len(templates))
188 for _, tmpl := range templates {
189 doc, err := yaml.Marshal(tmpl)
190 if err != nil {
191 continue
192 }
193 docs = append(docs, doc)
194 }
195 return AppendProtonTemplates(docs)
196}
197
198func LoadExtractorConfig(filename string) ([]*parsers.Extractor, error) {
199 var extracts []*parsers.Extractor

Callers 2

BuildPluginMethod · 0.92
mustLoadFoundKeysFunction · 0.85

Calls 2

AppendProtonTemplatesFunction · 0.85
LoadConfigFunction · 0.70

Tested by 1

mustLoadFoundKeysFunction · 0.68