github.com/HXSecurity/DongTai-agent-go@v0.4.2/core/base/stringsReplace/install.go (about) 1 package stringsReplace 2 3 import ( 4 "github.com/HXSecurity/DongTai-agent-go/model" 5 "github.com/brahma-adshonor/gohook" 6 "strings" 7 ) 8 9 func init() { 10 model.HookMap["stringsReplace"] = new(StringsReplace) 11 } 12 13 type StringsReplace struct { 14 } 15 16 func (h *StringsReplace) Hook() { 17 gohook.Hook(strings.Replace, Replace, ReplaceR) 18 } 19 20 func (h *StringsReplace) UnHook() { 21 gohook.UnHook(strings.Replace) 22 }