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

     1  package runtimeConcatstrings
     2  
     3  import (
     4  	"fmt"
     5  	"github.com/HXSecurity/DongTai-agent-go/model"
     6  	"github.com/brahma-adshonor/gohook"
     7  )
     8  
     9  func init() {
    10  	model.HookMap["runtimeConcatstrings"] = new(RuntimeConcatstrings)
    11  }
    12  
    13  type RuntimeConcatstrings struct {
    14  }
    15  
    16  func (h *RuntimeConcatstrings) Hook() {
    17  	err := gohook.Hook(concatstrings, concatstringsR, concatstringsT)
    18  	if err != nil {
    19  		fmt.Println(err, "RuntimeConcatstrings")
    20  	} else {
    21  		fmt.Println("RuntimeConcatstrings")
    22  	}
    23  }
    24  
    25  func (h *RuntimeConcatstrings) UnHook() {
    26  	gohook.UnHook(concatstrings)
    27  }