Versions in this module Expand all Collapse all v0 v0.1.8 May 10, 2024 v0.1.7 May 6, 2024 v0.1.6 Jan 9, 2024 v0.1.5 Sep 21, 2023 Changes in this version + const FT_CALL + const FT_CondJmp + const FT_INVALID + const FT_JMP + const FT_OTHER + const FT_OVERFLOW + const FT_RET + const FT_SKIP + const PAGE_EXECUTE_READWRITE — windows/amd64 + func CopyFunction(allowCall bool, from, to interface{}, info *CodeInfo) ([]byte, error) + func CopyInstruction(location uintptr, data []byte) + func FixOneInstruction(mode int, fix_recursive_call bool, startAddr, curAddr uintptr, code []byte, ...) (int, int, []byte) + func GetArchMode() int + func GetFuncAddr(f interface{}) uintptr + func GetFuncInstSize(f interface{}) uint32 + func GetFuncSizeByGuess(mode int, start uintptr, minimal bool) (uint32, error) + func GetInsLenGreaterThan(mode int, data []byte, least int) int + func Hook(target, replacement, trampoline interface{}) error + func HookByIndirectJmp(target, replacement, trampoline interface{}) error + func HookMethod(instance interface{}, method string, replacement, trampoline interface{}) error + func ResetFuncPrologue() + func SetFuncPrologue(mode int, data []byte) + func SetMinJmpCodeSize(sz int) + func ShowDebugInfo() string + func UnHook(target interface{}) error + func UnHookMethod(instance interface{}, methodName string) error + type CodeFix struct + Addr uintptr + Code []byte + Foreign bool + func FixTargetFuncCode(mode int, start uintptr, funcSz uint32, to uintptr, move_sz int) ([]CodeFix, error) + type CodeInfo struct + Fix []CodeFix + How string + Origin []byte + TrampolineOrig []byte + type ElfInfo struct + CurFile string + Symbol SymbolSlice + func NewElfInfo() (*ElfInfo, error) + func (ei *ElfInfo) GetFuncSize(addr uintptr) (uint32, error) + type HookInfo struct + Info *CodeInfo + Mode int + Replacement reflect.Value + Target reflect.Value + Trampoline reflect.Value + type SymbolSlice []elf.Symbol + func (a SymbolSlice) Len() int + func (a SymbolSlice) Less(i, j int) bool + func (a SymbolSlice) Swap(i, j int)