From bb42d128a4f44b0bdfa30c71d7ec6e8dacf2455e Mon Sep 17 00:00:00 2001 From: Geoffrey Thomas Date: Mon, 23 Aug 2010 06:00:44 -0400 Subject: [PATCH] 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 --- programming/disasm | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 programming/disasm 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" -- 2.45.0