mirror of https://github.com/daffainfo/nuclei.git
Added read command to network
parent
593e2319c4
commit
1de5cdb124
|
@ -45,6 +45,8 @@ type Input struct {
|
|||
Data string `yaml:"data"`
|
||||
// Type is the type of input - hex, text.
|
||||
Type string `yaml:"type"`
|
||||
// Read is the number of bytes to read from socket
|
||||
Read int `yaml:"read"`
|
||||
}
|
||||
|
||||
// GetID returns the unique ID of the request if any.
|
||||
|
|
|
@ -91,6 +91,13 @@ func (r *Request) executeAddress(actualAddress, address, input string, previous
|
|||
r.options.Progress.DecrementRequests(1)
|
||||
return errors.Wrap(err, "could not write request to server")
|
||||
}
|
||||
|
||||
bufferSize := 1024
|
||||
if r.ReadSize != 0 {
|
||||
bufferSize = r.ReadSize
|
||||
}
|
||||
buffer := make([]byte, bufferSize)
|
||||
_, _ = conn.Read(buffer)
|
||||
r.options.Progress.IncrementRequests()
|
||||
}
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue