rizin/test/db/cmd/cmd_ph
Giovanni 31fc5fbf22
Converting ph commands to rzshell ##shell (#1415)
* Converting `ph` commands to rzshell
* Use `@!` for changing the block size
2021-08-10 00:50:55 +08:00

18 lines
630 B
Text

NAME=ph file with offsets
FILE=bins/elf/analysis/x86-helloworld-gcc
CMDS=<<EOF
e io.va=0
ph sha1 @!$s-32 @ 32
!rz-hash -a sha1 -f 32 -t 4899 bins/elf/analysis/x86-helloworld-gcc
ph sha1 @!$s @0
!rz-hash -a sha1 bins/elf/analysis/x86-helloworld-gcc
ph sha1 @s:fofofofo
EOF
EXPECT=<<EOF
1fa8a7fd5c661af321d09f5951b35684f209f815
bins/elf/analysis/x86-helloworld-gcc: 0x00000020-0x00001323 sha1: 1fa8a7fd5c661af321d09f5951b35684f209f815
e218202875386cf4a0cd3ce22490fcd48db91491
bins/elf/analysis/x86-helloworld-gcc: 0x00000000-0x00001323 sha1: e218202875386cf4a0cd3ce22490fcd48db91491
b9a2dc76a3571526786cf651570df206a93f63fa
EOF
RUN