From: Geoffrey Thomas Date: Mon, 23 Aug 2010 10:00:44 +0000 (-0400) Subject: disasm: Disassemble hex bytes given on the command line as x86 X-Git-Url: https://snippets.scripts.mit.edu/gitweb.cgi/Scripts/git/.git/commitdiff_plain/bb42d128a4f44b0bdfa30c71d7ec6e8dacf2455e disasm: Disassemble hex bytes given on the command line as x86 dr-wily:~ geofft$ disasm c9c3 0: c9 leave 1: c3 ret Signed-off-by: Geoffrey Thomas --- diff --git a/programming/disasm b/programming/disasm new file mode 100755 index 0000000..0531dc5 --- /dev/null +++ b/programming/disasm @@ -0,0 +1,6 @@ +#!/bin/sh + +file=$(mktemp) +echo "$*" | xxd -r -p > "$file" +objdump -D -b binary -m i386 "$file" | tail -n +7 +rm "$file"