Documentation ¶
Index ¶
- Constants
- 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
- type CodeInfo
- type ElfInfo
- type HookInfo
- type SymbolSlice
Constants ¶
View Source
const ( FT_CondJmp = 1 FT_JMP = 2 FT_CALL = 3 FT_RET = 4 FT_OTHER = 5 FT_INVALID = 6 FT_SKIP = 7 FT_OVERFLOW = 8 )
Variables ¶
This section is empty.
Functions ¶
func CopyFunction ¶
func CopyInstruction ¶
func FixOneInstruction ¶
func GetArchMode ¶
func GetArchMode() int
func GetFuncAddr ¶
func GetFuncAddr(f interface{}) uintptr
func GetFuncInstSize ¶
func GetFuncInstSize(f interface{}) uint32
func GetFuncSizeByGuess ¶
func HookByIndirectJmp ¶
func HookByIndirectJmp(target, replacement, trampoline interface{}) error
func HookMethod ¶
func ResetFuncPrologue ¶
func ResetFuncPrologue()
func SetFuncPrologue ¶
func SetMinJmpCodeSize ¶
func SetMinJmpCodeSize(sz int)
func ShowDebugInfo ¶
func ShowDebugInfo() string
func UnHookMethod ¶
Types ¶
type CodeFix ¶
func FixTargetFuncCode ¶
func FixTargetFuncCode(mode int, start uintptr, funcSz uint32, to uintptr, move_sz int) ([]CodeFix, error)
FixTargetFuncCode fix function code starting at address [start] parameter 'funcSz' may not specify, in which case, we need to find out the end by scanning next prologue or finding invalid instruction. 'to' specifys a new location, to which 'move_sz' bytes instruction will be copied since move_sz byte instructions will be copied, those relative jump instruction need to be fixed.
type SymbolSlice ¶
func (SymbolSlice) Len ¶
func (a SymbolSlice) Len() int
func (SymbolSlice) Less ¶
func (a SymbolSlice) Less(i, j int) bool
func (SymbolSlice) Swap ¶
func (a SymbolSlice) Swap(i, j int)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.