mirror of
https://github.com/chainreactors/spray.git
synced 2025-09-15 19:50:18 +00:00
fix: try fix deadlock, thanks https://github.com/chainreactors/spray/pull/89
This commit is contained in:
parent
de12d568ce
commit
0f1e6b8333
@ -96,7 +96,7 @@ type OutputOptions struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type RequestOptions struct {
|
type RequestOptions struct {
|
||||||
Method string `short:"x" long:"method" default:"GET" description:"String, request method, e.g.: --method POST" config:"method"`
|
Method string `short:"X" long:"method" default:"GET" description:"String, request method, e.g.: --method POST" config:"method"`
|
||||||
Headers []string `long:"header" description:"Strings, custom headers, e.g.: --header 'Auth: example_auth'" config:"headers"`
|
Headers []string `long:"header" description:"Strings, custom headers, e.g.: --header 'Auth: example_auth'" config:"headers"`
|
||||||
UserAgent string `long:"user-agent" description:"String, custom user-agent, e.g.: --user-agent Custom" config:"useragent"`
|
UserAgent string `long:"user-agent" description:"String, custom user-agent, e.g.: --user-agent Custom" config:"useragent"`
|
||||||
RandomUserAgent bool `long:"random-agent" description:"Bool, use random with default user-agent" config:"random-useragent"`
|
RandomUserAgent bool `long:"random-agent" description:"Bool, use random with default user-agent" config:"random-useragent"`
|
||||||
|
@ -329,10 +329,11 @@ func (pool *BrutePool) Invoke(v interface{}) {
|
|||||||
defer pool.initwg.Done()
|
defer pool.initwg.Done()
|
||||||
pool.locker.Lock()
|
pool.locker.Lock()
|
||||||
pool.random = bl
|
pool.random = bl
|
||||||
|
pool.locker.Unlock()
|
||||||
|
|
||||||
if !bl.IsValid {
|
if !bl.IsValid {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
pool.locker.Unlock()
|
|
||||||
bl.Collect()
|
bl.Collect()
|
||||||
pool.addFuzzyBaseline(bl)
|
pool.addFuzzyBaseline(bl)
|
||||||
|
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
package internal
|
|
||||||
|
|
||||||
//type bytesPatcher struct{}
|
|
||||||
//
|
|
||||||
//func (p *bytesPatcher) Visit(node *ast.Node) {
|
|
||||||
// switch (*node).(type) {
|
|
||||||
// case *ast.MemberNode:
|
|
||||||
// ast.Patch(node, &ast.CallNode{
|
|
||||||
// Callee: &ast.MemberNode{
|
|
||||||
// Node: *node,
|
|
||||||
// Name: "String",
|
|
||||||
// Property: &ast.StringNode{Value: "String"},
|
|
||||||
// },
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
var ConfigTemplate = `
|
|
||||||
-----------------------------------------------------------
|
|
||||||
|
|
||||||
-----------------------------------------------------------
|
|
||||||
`
|
|
Loading…
x
Reference in New Issue
Block a user