-
-
Save lethalbit/45b6f416cf0fe72d2f8f947f157b6587 to your computer and use it in GitHub Desktop.
Quick in-shell assemble / get opcodes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
basm() { tmpf=$(mktemp -u);as - -o $tmpf; [[ $? == 0 ]] && objdump -d $tmpf && rm $tmpf || return 1; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(~) 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