Skip to content

Instantly share code, notes, and snippets.

@grantseltzer
Created September 14, 2018 04:41
Show Gist options
  • Save grantseltzer/c44ac782ef271b141fa1ac88c0e5fcd4 to your computer and use it in GitHub Desktop.
Save grantseltzer/c44ac782ef271b141fa1ac88c0e5fcd4 to your computer and use it in GitHub Desktop.
Running bytes through gapstone
input := []byte{0x64, 0x48, 0x8B, 0xC, 0x25, 0xF8, 0xFF, 0xFF, 0xFF}
instructions, err := engine.Disasm(input, 0, 0)
if err != nil {
log.Fatal(err)
}
for _, instruction := range instructions {
fmt.Printf("0x%x:\t%s\t\t%s\n", instruction.Address, instruction.Mnemonic, instruction.OpStr)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment