Enthernet Code
Enthernet Code
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
@Marvee Amasi To disassemble each 7-byte instruction set and filter out lines containing static jumps like loopne, Disassemble 7-byte blocks, You can use echo or xxd to format the output of your program into binary files for disassembly. Instead of /dev/stdin, use temporary binary files for disassembly with objdump. For instance save each 7-byte line into a temporary binary file and disassemble
while read -r line; do
echo "$line" | xxd -r -p > tmp.bin
objdump -b binary -m i386 -D tmp.bin | grep -v 'loopne'
done < input_file
while read -r line; do
echo "$line" | xxd -r -p > tmp.bin
objdump -b binary -m i386 -D tmp.bin | grep -v 'loopne'
done < input_file
3 replies