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

     1  package execCmdStart
     2  
     3  import (
     4  	"github.com/HXSecurity/DongTai-agent-go/model/request"
     5  	"os/exec"
     6  	"reflect"
     7  )
     8  
     9  func Start(cmd *exec.Cmd) error {
    10  	e := StartT(cmd)
    11  	//
    12  	var u uintptr
    13  	value := reflect.ValueOf(cmd)
    14  	u = value.Pointer()
    15  	request.FmtHookPool(request.PoolReq{
    16  		Args:            request.Collect(cmd.Args),
    17  		Reqs:            request.Collect(e),
    18  		NeedHook:        request.Collect(u),
    19  		Source:          false,
    20  		OriginClassName: "exec.(*Cmd)",
    21  		MethodName:      "Start",
    22  		ClassName:       "exec.(*Cmd)",
    23  	})
    24  	return e
    25  }
    26  
    27  func StartT(cmd *exec.Cmd) error {
    28  	return nil
    29  }