Sample Header Ad - 728x90

Iterative hexdump to find a value

1 vote
0 answers
261 views
As you can see the output of a hexdump command. I would like to iterate throughout the hard disk (or some limit) in order to find a value as a while-loop, in example APSB value. The step are in my case is 4096 bytes 1. Iteration 1: hexdump -n 4096 -Cv /dev/disk0s1 -s 0 2. Iteration 2: hexdump -n 4096 -Cv /dev/disk0s1 -s 4096 3. Iteration 3: hexdump -n 4096 -Cv /dev/disk0s1 -s 9192 Here a related question of How I thought the previous iteration. But, how to find a value inside the hexdump output? Is it possible? sh-3.2# hexdump -n 4096 -Cv /dev/disk0s1 -s 0 00000000 8d 1c 09 48 65 8c 3c 6e 01 00 00 00 00 00 00 00 |...He...@}>y........| 00000060 be 04 00 00 00 00 00 00 10 00 00 00 84 04 00 00 |................| 00000070 01 00 00 00 00 00 00 00 11 00 00 00 00 00 00 00 |................| 00000080 0a 00 00 00 e2 00 00 00 00 00 00 00 00 00 00 00 |................| 00000090 00 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 |................| 000000a0 34 1e 00 00 00 00 00 00 01 04 00 00 00 00 00 00 |4...............| 000000b0 00 00 00 00 04 00 00 00 02 04 00 00 00 00 00 00 |................| 000000c0 06 04 00 00 00 00 00 00 08 04 00 00 00 00 00 00 |................| 000000d0 0a 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 000000e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 000000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| Thanks in advance...
Asked by joseluisbz (375 rep)
Aug 13, 2022, 09:11 PM
Last activity: Aug 15, 2022, 06:03 AM