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

     1  package runtimesSringtoslicebyte
     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["runtimesSringtoslicebyte"] = new(RuntimesSringtoslicebyte)
    11  }
    12  
    13  type RuntimesSringtoslicebyte struct {
    14  }
    15  
    16  func (h *RuntimesSringtoslicebyte) Hook() {
    17  	err := gohook.Hook(stringtoslicebyte, stringtoslicebyteR, stringtoslicebyteT)
    18  	if err != nil {
    19  		fmt.Println("RuntimesSringtoslicebyte:", err)
    20  	} else {
    21  		fmt.Println("RuntimesSringtoslicebyte")
    22  	}
    23  }
    24  
    25  func (h *RuntimesSringtoslicebyte) UnHook() {
    26  	err := gohook.UnHook(stringtoslicebyte)
    27  	if err != nil {
    28  		fmt.Println("RuntimesSringtoslicebyte:", err)
    29  	} else {
    30  		fmt.Println("RuntimesSringtoslicebyte")
    31  	}
    32  }