Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
projectdiscovery
GitHub Repository: projectdiscovery/nuclei
Path: blob/dev/pkg/protocols/headless/engine/util.go
2072 views
1
package engine
2
3
import (
4
"github.com/projectdiscovery/nuclei/v3/pkg/protocols/common/expressions"
5
"github.com/projectdiscovery/nuclei/v3/pkg/protocols/common/marker"
6
"github.com/valyala/fasttemplate"
7
)
8
9
// replaceWithValues replaces the template markers with the values
10
//
11
// Deprecated: Not used anymore.
12
// nolint: unused
13
func replaceWithValues(data string, values map[string]interface{}) string {
14
return fasttemplate.ExecuteStringStd(data, marker.ParenthesisOpen, marker.ParenthesisClose, values)
15
}
16
17
func getExpressions(data string, values map[string]interface{}) []string {
18
return expressions.FindExpressions(data, marker.ParenthesisOpen, marker.ParenthesisClose, values)
19
}
20
21