mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 08:45:27 +00:00
Use older ioutil package for compatibility
This commit is contained in:
parent
d8b9172559
commit
63bc417398
@ -4,7 +4,7 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -101,10 +101,10 @@ func (i *Exporter) Export(event *output.ResultEvent) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
req.Body = io.NopCloser(bytes.NewReader(b))
|
req.Body = ioutil.NopCloser(bytes.NewReader(b))
|
||||||
|
|
||||||
res, err := i.elasticsearch.Do(req)
|
res, err := i.elasticsearch.Do(req)
|
||||||
b, _ = io.ReadAll(res.Body)
|
b, _ = ioutil.ReadAll(res.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.New(err.Error() + "error thrown by elasticsearch " + string(b))
|
return errors.New(err.Error() + "error thrown by elasticsearch " + string(b))
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user