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

     1  package runtimeMapassign_faststr
     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(RuntimeMapassign_faststr)
    11  }
    12  
    13  type RuntimeMapassign_faststr struct {
    14  }
    15  
    16  func (h *RuntimeMapassign_faststr) Hook() {
    17  	err := gohook.Hook(mapassign_faststr, mapassign_faststrR, mapassign_faststrT)
    18  	if err != nil {
    19  		fmt.Println(err, "RuntimeMapassign_faststr")
    20  	} else {
    21  		fmt.Println("RuntimeMapassign_faststr")
    22  	}
    23  }
    24  
    25  func (h *RuntimeMapassign_faststr) UnHook() {
    26  	gohook.UnHook(mapassign_faststr)
    27  }