github.com/HXSecurity/DongTai-agent-go@v0.4.2/core/base/stringsRepeat/install.go (about) 1 package stringsRepeat 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["stringsRepeat"] = new(StringsRepeat) 11 } 12 13 type StringsRepeat struct { 14 } 15 16 func (h *StringsRepeat) Hook() { 17 gohook.Hook(strings.Repeat, Repeat, RepeatR) 18 } 19 20 func (h *StringsRepeat) UnHook() { 21 gohook.UnHook(strings.Repeat) 22 }