github.com/HXSecurity/DongTai-agent-go@v0.4.2/core/base/ioReadAll/replacement.go (about)

     1  package ioReadAll
     2  
     3  import (
     4  	"github.com/HXSecurity/DongTai-agent-go/model/request"
     5  	"github.com/pkg/errors"
     6  	"io"
     7  	"reflect"
     8  )
     9  
    10  func ReadAll(r io.Reader) ([]byte, error) {
    11  
    12  	v := reflect.ValueOf(r)
    13  	b, e := ReadAllT(r)
    14  	var u uintptr
    15  	value := reflect.ValueOf(b)
    16  	u = value.Pointer()
    17  	request.FmtHookPool(request.PoolReq{
    18  		Args:            request.Collect(r),
    19  		Reqs:            request.Collect(b, e),
    20  		NeedCatch:       request.Collect(u),
    21  		Source:          v.Type().String() == "*http.body",
    22  		OriginClassName: "io",
    23  		MethodName:      "ReadAll",
    24  		ClassName:       "io",
    25  	})
    26  	return b, e
    27  }
    28  
    29  func ReadAllT(r io.Reader) ([]byte, error) {
    30  	return []byte{}, errors.New("")
    31  }