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

     1  package httpRequestFormValue
     2  
     3  import (
     4  	"github.com/HXSecurity/DongTai-agent-go/model/request"
     5  	"net/http"
     6  )
     7  
     8  func FormValue(req *http.Request, key string) string {
     9  	r := FormValueT(req, key)
    10  	request.FmtHookPool(request.PoolReq{
    11  		Args:            request.Collect(key),
    12  		Reqs:            request.Collect(r),
    13  		Source:          true,
    14  		OriginClassName: "http.(*Request)",
    15  		MethodName:      "FormValue",
    16  		ClassName:       "http.(*Request)",
    17  	})
    18  	return r
    19  }
    20  
    21  func FormValueT(r *http.Request, key string) string {
    22  	return key
    23  }