mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 17:05:29 +00:00
Fixed lint errors
This commit is contained in:
parent
f85a421550
commit
6c4495c0d1
@ -82,9 +82,9 @@ func New(options *Options) (*Client, error) {
|
|||||||
configure = configure.MaxSize(options.CacheSize)
|
configure = configure.MaxSize(options.CacheSize)
|
||||||
cache := ccache.New(configure)
|
cache := ccache.New(configure)
|
||||||
|
|
||||||
interactionsConfig := ccache.Configure()
|
interactionsCfg := ccache.Configure()
|
||||||
interactionsConfig = configure.MaxSize(defaultMaxInteractionsCount)
|
interactionsCfg = interactionsCfg.MaxSize(defaultMaxInteractionsCount)
|
||||||
interactionsCache := ccache.New(interactionsConfig)
|
interactionsCache := ccache.New(interactionsCfg)
|
||||||
|
|
||||||
interactClient := &Client{
|
interactClient := &Client{
|
||||||
interactsh: interactsh,
|
interactsh: interactsh,
|
||||||
@ -105,12 +105,10 @@ func New(options *Options) (*Client, error) {
|
|||||||
gotItem := interactClient.interactions.Get(interaction.UniqueID)
|
gotItem := interactClient.interactions.Get(interaction.UniqueID)
|
||||||
if gotItem == nil {
|
if gotItem == nil {
|
||||||
interactClient.interactions.Set(interaction.UniqueID, []*server.Interaction{interaction}, defaultInteractionDuration)
|
interactClient.interactions.Set(interaction.UniqueID, []*server.Interaction{interaction}, defaultInteractionDuration)
|
||||||
} else {
|
} else if items, ok := gotItem.Value().([]*server.Interaction); ok {
|
||||||
if items, ok := gotItem.Value().([]*server.Interaction); ok {
|
|
||||||
items = append(items, interaction)
|
items = append(items, interaction)
|
||||||
interactClient.interactions.Set(interaction.UniqueID, items, defaultInteractionDuration)
|
interactClient.interactions.Set(interaction.UniqueID, items, defaultInteractionDuration)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
request, ok := item.Value().(*RequestData)
|
request, ok := item.Value().(*RequestData)
|
||||||
|
|||||||
@ -169,8 +169,7 @@ func (r *Request) executeAddress(actualAddress, address, input string, shouldUse
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
callback(event)
|
callback(event)
|
||||||
} else {
|
} else if r.options.Interactsh != nil {
|
||||||
if r.options.Interactsh != nil {
|
|
||||||
r.options.Interactsh.RequestEvent(interactURL, &interactsh.RequestData{
|
r.options.Interactsh.RequestEvent(interactURL, &interactsh.RequestData{
|
||||||
MakeResultFunc: r.MakeResultEvent,
|
MakeResultFunc: r.MakeResultEvent,
|
||||||
Event: event,
|
Event: event,
|
||||||
@ -179,7 +178,6 @@ func (r *Request) executeAddress(actualAddress, address, input string, shouldUse
|
|||||||
ExtractFunc: r.Extract,
|
ExtractFunc: r.Extract,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user