mirror of https://github.com/daffainfo/nuclei.git
Merge pull request #255 from vzamanillo/colorizer-fix
Colorizer initialization when using a custom workflowdev
commit
3a7379dbd7
|
@ -4,6 +4,7 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
tengo "github.com/d5/tengo/v2"
|
tengo "github.com/d5/tengo/v2"
|
||||||
|
"github.com/logrusorgru/aurora"
|
||||||
"github.com/projectdiscovery/gologger"
|
"github.com/projectdiscovery/gologger"
|
||||||
"github.com/projectdiscovery/nuclei/v2/internal/progress"
|
"github.com/projectdiscovery/nuclei/v2/internal/progress"
|
||||||
"github.com/projectdiscovery/nuclei/v2/pkg/atomicboolean"
|
"github.com/projectdiscovery/nuclei/v2/pkg/atomicboolean"
|
||||||
|
@ -64,6 +65,9 @@ func (n *NucleiVar) Call(args ...tengo.Object) (ret tengo.Object, err error) {
|
||||||
// apply externally supplied payloads if any
|
// apply externally supplied payloads if any
|
||||||
request.Payloads = generators.MergeMaps(request.Payloads, externalVars)
|
request.Payloads = generators.MergeMaps(request.Payloads, externalVars)
|
||||||
template.HTTPOptions.BulkHttpRequest = request
|
template.HTTPOptions.BulkHttpRequest = request
|
||||||
|
if template.HTTPOptions.Colorizer == nil {
|
||||||
|
template.HTTPOptions.Colorizer = aurora.NewAurora(true)
|
||||||
|
}
|
||||||
httpExecuter, err := executer.NewHTTPExecuter(template.HTTPOptions)
|
httpExecuter, err := executer.NewHTTPExecuter(template.HTTPOptions)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
p.Drop(request.GetRequestCount())
|
p.Drop(request.GetRequestCount())
|
||||||
|
|
Loading…
Reference in New Issue