mirror of
https://github.com/chainreactors/spray.git
synced 2025-09-15 11:40:13 +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])
|
u, _ = url.Parse("http://" + opt.URL[0])
|
||||||
}
|
}
|
||||||
go func() {
|
go func() {
|
||||||
opt.GenerateTasks(tasks, u.Hostname(), ports)
|
opt.GenerateTasks(tasks, u.String(), ports)
|
||||||
close(tasks)
|
close(tasks)
|
||||||
}()
|
}()
|
||||||
taskfrom = u.Host
|
taskfrom = u.Host
|
||||||
|
@ -583,7 +583,6 @@ func (pool *Pool) doRedirect(bl *pkg.Baseline, depth int) {
|
|||||||
|
|
||||||
pool.waiter.Add(1)
|
pool.waiter.Add(1)
|
||||||
go func() {
|
go func() {
|
||||||
defer pool.waiter.Done()
|
|
||||||
pool.addAddition(&Unit{
|
pool.addAddition(&Unit{
|
||||||
path: reURL,
|
path: reURL,
|
||||||
source: RedirectSource,
|
source: RedirectSource,
|
||||||
|
@ -108,7 +108,7 @@ func (r *Runner) PrepareConfig() *pkg.Config {
|
|||||||
RandomUserAgent: r.RandomUserAgent,
|
RandomUserAgent: r.RandomUserAgent,
|
||||||
}
|
}
|
||||||
|
|
||||||
if config.ClientType == 0 {
|
if config.ClientType == ihttp.Auto {
|
||||||
if config.Mod == pkg.PathSpray {
|
if config.Mod == pkg.PathSpray {
|
||||||
config.ClientType = ihttp.FAST
|
config.ClientType = ihttp.FAST
|
||||||
} else if config.Mod == pkg.HostSpray {
|
} else if config.Mod == pkg.HostSpray {
|
||||||
|
@ -51,9 +51,10 @@ func NewClient(thread int, timeout int, clientType int) *Client {
|
|||||||
Renegotiation: tls.RenegotiateOnceAsClient,
|
Renegotiation: tls.RenegotiateOnceAsClient,
|
||||||
InsecureSkipVerify: true,
|
InsecureSkipVerify: true,
|
||||||
},
|
},
|
||||||
MaxConnsPerHost: thread * 3 / 2,
|
TLSHandshakeTimeout: time.Duration(timeout) * time.Second,
|
||||||
IdleConnTimeout: time.Duration(timeout) * time.Second,
|
MaxConnsPerHost: thread * 3 / 2,
|
||||||
ReadBufferSize: 16384, // 16k
|
IdleConnTimeout: time.Duration(timeout) * time.Second,
|
||||||
|
ReadBufferSize: 16384, // 16k
|
||||||
},
|
},
|
||||||
Timeout: time.Second * time.Duration(timeout),
|
Timeout: time.Second * time.Duration(timeout),
|
||||||
CheckRedirect: func(req *http.Request, via []*http.Request) error {
|
CheckRedirect: func(req *http.Request, via []*http.Request) error {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user