Marvee Amasi
DIIDevHeads IoT Integration Server
•Created by Marvee Amasi on 10/3/2024 in #code-review
How to Disassemble and Filter Out Static Jumps in Program Output with Bash
My program outputs encoded instructions, and each line represents an independent set of instructions, like this:
So each line consists of 7 bytes of encoded instructions, and I need to disassemble each of them separately as distinct programs. I can also output the binary directly, and in that case, each 7 byte block of instructions must be disassembled individually.
In the bash script that runs my program, I want to filter out lines that contain static jumps. I want to:
1. Disassemble each instruction set from the program output.
2. Use a command like
grep
to filter out lines containing certain instructions, like loopne
.
I tried using objdump
, but it doesn't accept /dev/stdin
as an input file.
How can I disassemble each line of 7 byte instructions separately from stdin
and filter out the ones containing static jumps ?3 replies