Skip to content

Instantly share code, notes, and snippets.

@khyberspache
Created January 19, 2021 14:47
Show Gist options
  • Save khyberspache/48a7c3c166c086f6a2c378e1f21e6eb3 to your computer and use it in GitHub Desktop.
Save khyberspache/48a7c3c166c086f6a2c378e1f21e6eb3 to your computer and use it in GitHub Desktop.
Example of loading windows DLL and Procs for keylogging
var (
user32 = syscall.NewLazyDLL("user32.dll")
getAsyncKeyState = user32.NewProc("GetAsyncKeyState")
getKeyboardLayout = user32.NewProc("GetKeyboardLayout")
getKeyState = user32.NewProc("GetKeyState")
toUnicodeEx = user32.NewProc("ToUnicodeEx")
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment