mirror of
https://github.com/chainreactors/spray.git
synced 2025-05-06 18:51:22 +00:00
修复url解析错误的bug
修复redirect的wg计算错误的bug
This commit is contained in:
parent
ccc9ca3719
commit
1bcf2f297d
@ -366,7 +366,7 @@ func (opt *Option) PrepareRunner() (*Runner, error) {
|
||||
u, _ = url.Parse("http://" + opt.URL[0])
|
||||
}
|
||||
go func() {
|
||||
opt.GenerateTasks(tasks, u.Hostname(), ports)
|
||||
opt.GenerateTasks(tasks, u.String(), ports)
|
||||
close(tasks)
|
||||
}()
|
||||
taskfrom = u.Host
|
||||
|
@ -583,7 +583,6 @@ func (pool *Pool) doRedirect(bl *pkg.Baseline, depth int) {
|
||||
|
||||
pool.waiter.Add(1)
|
||||
go func() {
|
||||
defer pool.waiter.Done()
|
||||
pool.addAddition(&Unit{
|
||||
path: reURL,
|
||||
source: RedirectSource,
|
||||
|
@ -108,7 +108,7 @@ func (r *Runner) PrepareConfig() *pkg.Config {
|
||||
RandomUserAgent: r.RandomUserAgent,
|
||||
}
|
||||
|
||||
if config.ClientType == 0 {
|
||||
if config.ClientType == ihttp.Auto {
|
||||
if config.Mod == pkg.PathSpray {
|
||||
config.ClientType = ihttp.FAST
|
||||
} else if config.Mod == pkg.HostSpray {
|
||||
|
@ -51,9 +51,10 @@ func NewClient(thread int, timeout int, clientType int) *Client {
|
||||
Renegotiation: tls.RenegotiateOnceAsClient,
|
||||
InsecureSkipVerify: true,
|
||||
},
|
||||
MaxConnsPerHost: thread * 3 / 2,
|
||||
IdleConnTimeout: time.Duration(timeout) * time.Second,
|
||||
ReadBufferSize: 16384, // 16k
|
||||
TLSHandshakeTimeout: time.Duration(timeout) * time.Second,
|
||||
MaxConnsPerHost: thread * 3 / 2,
|
||||
IdleConnTimeout: time.Duration(timeout) * time.Second,
|
||||
ReadBufferSize: 16384, // 16k
|
||||
},
|
||||
Timeout: time.Second * time.Duration(timeout),
|
||||
CheckRedirect: func(req *http.Request, via []*http.Request) error {
|
||||
|
Loading…
x
Reference in New Issue
Block a user