mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2026-11-12 16:12:33 -10:00
* chore(deps): strip dependencies Signed-off-by: Dwi Siswanto <[email protected]> * chore: drop stripped dependencies Signed-off-by: Dwi Siswanto <[email protected]> * tests(integration): reduce external service flakiness Signed-off-by: Dwi Siswanto <[email protected]> * refactor(types): replace govalidator ASCII check Signed-off-by: Dwi Siswanto <[email protected]> * chore(trackers): update go-github import path Signed-off-by: Dwi Siswanto <[email protected]> * chore: use our PD wrapper Signed-off-by: Dwi Siswanto <[email protected]> * chore: use our PD cache packages Signed-off-by: Dwi Siswanto <[email protected]> * chore(utils): use x/net publicsuffix Signed-off-by: Dwi Siswanto <[email protected]> * chore(input): decode YAML without invopop/yaml Signed-off-by: Dwi Siswanto <[email protected]> * refactor(yaml): route callers through pkg/utils/yaml Signed-off-by: Dwi Siswanto <[email protected]> * refactor(json): route callers through pkg/utils/json Signed-off-by: Dwi Siswanto <[email protected]> * refactpr(scan): replace Echo handlers with net/http Signed-off-by: Dwi Siswanto <[email protected]> * refactor(server): replace Echo with net/http Signed-off-by: Dwi Siswanto <[email protected]> * refactor(fuzzplayground): replace Echo server with net/http Signed-off-by: Dwi Siswanto <[email protected]> * test: update subdomains testdata Signed-off-by: Dwi Siswanto <[email protected]> * chore(yaml): satisfy lints Signed-off-by: Dwi Siswanto <[email protected]> * fix codeql --------- Signed-off-by: Dwi Siswanto <[email protected]> Co-authored-by: Mzack9999 <[email protected]>
20 lines
692 B
Go
20 lines
692 B
Go
package engine
|
|
|
|
import (
|
|
"github.com/projectdiscovery/fasttemplate"
|
|
"github.com/projectdiscovery/nuclei/v3/pkg/protocols/common/expressions"
|
|
"github.com/projectdiscovery/nuclei/v3/pkg/protocols/common/marker"
|
|
)
|
|
|
|
// replaceWithValues replaces the template markers with the values
|
|
//
|
|
// Deprecated: Not used anymore.
|
|
// nolint: unused
|
|
func replaceWithValues(data string, values map[string]interface{}) string {
|
|
return fasttemplate.ExecuteStringStd(data, marker.ParenthesisOpen, marker.ParenthesisClose, values)
|
|
}
|
|
|
|
func getExpressions(data string, values map[string]interface{}) []string {
|
|
return expressions.FindExpressions(data, marker.ParenthesisOpen, marker.ParenthesisClose, values)
|
|
}
|