castaneai / hinako Goto Github PK
View Code? Open in Web Editor NEWx86 WinAPI hook written in pure Go
Home Page: http://hinakonote.jp/
License: MIT License
x86 WinAPI hook written in pure Go
Home Page: http://hinakonote.jp/
License: MIT License
Can't compile sample.
arch := hinako.IA32Arch{}
IA32Arch{} undefined
var originalMessageBoxW *syscall.Proc
hook, err := hinako.NewHookByName(arch, "user32.dll", "MessageBoxW", func(hWnd syscall.Handle, lpText, lpCaption *uint16, uType uint) int {
log.Printf("%d , %d , %d" , *lpText , *lpCaption , uType)
r, _, _ := originalMessageBoxW.Call(uintptr(hWnd), wstrPtr("Hooked!"), wstrPtr("Hooked!"), uintptr(uType))
return int(r)
})
2021/11/26 16:19:25 77 , 77 , 0
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x18 pc=0x18b2c6]
goroutine 1 [running]:
syscall.(*Proc).Addr(...)
C:/Program Files/Go/src/syscall/dll_windows.go:158
syscall.(*Proc).Call(0x1e0aa3, {0xc0000113c0, 0xc0001196d0, 0xc0001107e0})
C:/Program Files/Go/src/syscall/dll_windows.go:189 +0x1e6
main.main.func1(0x0, 0x400, 0xc000012228, 0x0)
D:/github.com/go-procmon/main.go:23 +0x145
syscall.Syscall6(0x7fffd7e5c320, 0x4, 0x0, 0xc000012210, 0xc000012228, 0x0, 0x0, 0x0)
C:/Program Files/Go/src/runtime/syscall_windows.go:493 +0xfa
syscall.(*Proc).Call(0x11c327, {0xc000010280, 0x1cc800, 0xc000056401})
C:/Program Files/Go/src/syscall/dll_windows.go:189 +0x1fb
syscall.(*LazyProc).Call(0xc00012bb00, {0xc000010280, 0x4, 0x4})
C:/Program Files/Go/src/syscall/dll_windows.go:340 +0x50
main.main()
D:/github.com/go-procmon/main.go:34 +0x2a5
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.