mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 16:35:25 +00:00
Added read command to network
This commit is contained in:
parent
593e2319c4
commit
1de5cdb124
@ -45,6 +45,8 @@ type Input struct {
|
|||||||
Data string `yaml:"data"`
|
Data string `yaml:"data"`
|
||||||
// Type is the type of input - hex, text.
|
// Type is the type of input - hex, text.
|
||||||
Type string `yaml:"type"`
|
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.
|
// 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)
|
r.options.Progress.DecrementRequests(1)
|
||||||
return errors.Wrap(err, "could not write request to server")
|
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()
|
r.options.Progress.IncrementRequests()
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user