这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func main() {
flag.StringVar(&opts.outputFormat, "of", "json", "Output file format. Available formats: json")
flag.BoolVar(&conf.Quiet, "s", false, "Do not print additional information (silent mode)")
flag.BoolVar(&conf.StopOn403, "sf", false, "Stop when > 90% of responses return 403 Forbidden")
flag.BoolVar(&conf.FollowRedirects, "r", false, "Follow redirects")
flag.IntVar(&conf.Threads, "t", 40, "Number of concurrent threads.")
flag.BoolVar(&opts.showVersion, "V", false, "Show version information.")
flag.Parse()
Expand Down
40 changes: 21 additions & 19 deletions pkg/ffuf/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,26 @@ type optRange struct {
}

type Config struct {
StaticHeaders map[string]string
FuzzHeaders map[string]string
Method string
Url string
TLSSkipVerify bool
Data string
Quiet bool
Colors bool
Wordlist string
OutputFile string
OutputFormat string
StopOn403 bool
Delay optRange
Filters []FilterProvider
Matchers []FilterProvider
Threads int
Context context.Context
ProxyURL func(*http.Request) (*url.URL, error)
CommandLine string
StaticHeaders map[string]string
FuzzHeaders map[string]string
Method string
Url string
TLSSkipVerify bool
Data string
Quiet bool
Colors bool
Wordlist string
OutputFile string
OutputFormat string
StopOn403 bool
FollowRedirects bool
Delay optRange
Filters []FilterProvider
Matchers []FilterProvider
Threads int
Context context.Context
ProxyURL func(*http.Request) (*url.URL, error)
CommandLine string
}

func NewConfig(ctx context.Context) Config {
Expand All @@ -48,6 +49,7 @@ func NewConfig(ctx context.Context) Config {
conf.Data = ""
conf.Quiet = false
conf.StopOn403 = false
conf.FollowRedirects = false
conf.ProxyURL = http.ProxyFromEnvironment
conf.Filters = make([]FilterProvider, 0)
conf.Delay = optRange{0, 0, false, false}
Expand Down
4 changes: 4 additions & 0 deletions pkg/runner/simple.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ func NewSimpleRunner(conf *ffuf.Config) ffuf.RunnerProvider {
InsecureSkipVerify: conf.TLSSkipVerify,
},
}}

if conf.FollowRedirects {
simplerunner.client.CheckRedirect = nil
}
return &simplerunner
}

Expand Down