这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions v2/pkg/runner/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ import (
"errors"
"fmt"
"io"
"math/rand"
"os"
"os/user"
"path/filepath"
"reflect"
"strings"
"time"

"github.com/projectdiscovery/fileutil"
"github.com/projectdiscovery/goflags"
Expand Down Expand Up @@ -66,6 +68,9 @@ type Options struct {

// ParseOptions parses the command line flags provided by a user
func ParseOptions() *Options {
// Seed default random number generator
rand.Seed(time.Now().UnixNano())

// Migrate config to provider config
if fileutil.FileExists(defaultConfigLocation) && !fileutil.FileExists(defaultProviderConfigLocation) {
gologger.Info().Msgf("Detected old %s config file, trying to migrate providers to %s\n", defaultConfigLocation, defaultProviderConfigLocation)
Expand Down