mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 04:25:31 +00:00
minor improvements
Co-Authored-By: Ice3man <22318055+Ice3man543@users.noreply.github.com>
This commit is contained in:
parent
1b8f4b3f25
commit
4988ef76b5
@ -193,6 +193,10 @@ func New(options *types.Options) (*Runner, error) {
|
||||
if options.JSON {
|
||||
options.StatsJSON = true
|
||||
}
|
||||
|
||||
if options.StatsJSON {
|
||||
options.EnableProgressBar = true
|
||||
}
|
||||
// Creates the progress tracking object
|
||||
var progressErr error
|
||||
runner.progress, progressErr = progress.NewStatsTicker(options.StatsInterval, options.EnableProgressBar, options.StatsJSON, options.Metrics, options.MetricsPort)
|
||||
|
||||
@ -181,7 +181,7 @@ func printCallback(stats clistats.StatisticsClient) {
|
||||
func printCallbackJSON(stats clistats.StatisticsClient) {
|
||||
builder := &strings.Builder{}
|
||||
_ = json.NewEncoder(builder).Encode(metricsMap(stats))
|
||||
gologger.Print().Msg(builder.String())
|
||||
fmt.Printf("%s", builder.String())
|
||||
}
|
||||
|
||||
func metricsMap(stats clistats.StatisticsClient) map[string]interface{} {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user