github.com/HXSecurity/DongTai-agent-go@v0.4.2/core/base/osOpenFile/replacement.go (about) 1 package osOpenFile 2 3 import ( 4 "github.com/HXSecurity/DongTai-agent-go/model/request" 5 "os" 6 ) 7 8 func OpenFile(name string, flag int, perm os.FileMode) (*os.File, error) { 9 f, e := OpenFileT(name, flag, perm) 10 request.FmtHookPool(request.PoolReq{ 11 Args: request.Collect(name, flag, perm), 12 Reqs: request.Collect(f, e), 13 Source: false, 14 OriginClassName: "os", 15 MethodName: "OpenFile", 16 ClassName: "os", 17 }) 18 return f, e 19 } 20 21 func OpenFileT(name string, flag int, perm os.FileMode) (*os.File, error) { 22 return nil, nil 23 }