mirror of https://github.com/daffainfo/nuclei.git
fix panic: Only generate curl command if request is not nil
parent
ca6cc51302
commit
4a29443752
|
@ -384,7 +384,7 @@ func (request *Request) executeRequest(reqURL string, generatedRequest *generate
|
|||
}()
|
||||
|
||||
var curlCommand string
|
||||
if !request.Unsafe && resp != nil && generatedRequest.request != nil {
|
||||
if !request.Unsafe && resp != nil && generatedRequest.request != nil && resp.Request != nil {
|
||||
bodyBytes, _ := generatedRequest.request.BodyBytes()
|
||||
resp.Request.Body = ioutil.NopCloser(bytes.NewReader(bodyBytes))
|
||||
command, _ := http2curl.GetCurlCommand(resp.Request)
|
||||
|
|
Loading…
Reference in New Issue