Skip to content

Instantly share code, notes, and snippets.

@lethalbit
Created June 11, 2016 03:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lethalbit/45b6f416cf0fe72d2f8f947f157b6587 to your computer and use it in GitHub Desktop.
Save lethalbit/45b6f416cf0fe72d2f8f947f157b6587 to your computer and use it in GitHub Desktop.
Quick in-shell assemble / get opcodes
basm() { tmpf=$(mktemp -u);as - -o $tmpf; [[ $? == 0 ]] && objdump -d $tmpf && rm $tmpf || return 1; }
(~) Misaka λ echo "jmpq *(%rip)" | basm
/tmp/tmp.1BZszGkC6f: file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <.text>:
0: ff 25 00 00 00 00 jmpq *0x0(%rip) # 0x6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment