radare2/test/new/db/cmd/cmd_px
2020-01-17 17:47:00 +01:00

129 lines
9.9 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

NAME=px 10
FILE=malloc://1024
EXPECT=<<EOF
- offset - 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF
0x00000000 9090 9090 9090 9090 9090 ..........
EOF
CMDS=<<EOF
wx 90909090909090909090 ; px 10
EOF
RUN
NAME=px -10
FILE=malloc://1024
EXPECT=<<EOF
- offset - 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF
0x00000000 9090 9090 9090 9090 9090 ..........
EOF
CMDS=<<EOF
wx 90909090909090909090 ; s 10 ; px -10
EOF
RUN
NAME=pxd 16
FILE=malloc://1024
EXPECT=<<EOF
- offset - 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF
0x00000000 -57328 16432 0 0 . ..0@..........
EOF
CMDS=<<EOF
wx 1020ffff30400000
pxd 16
EOF
RUN
NAME=pxd 8
FILE=malloc://1024
EXPECT=<<EOF
- offset - 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF
0x00000000 -57328 16432 . ..0@..
EOF
CMDS=<<EOF
wx 1020ffff30400000
pxd 8
EOF
RUN
NAME=io.unalloc, io.unalloc.ch and pxc
FILE=../bins/elf/analysis/tiny.elf
CMDS=<<EOF
. ../bins/other/palette.r2
e io.unalloc=true
(dump, xc 0x00010060-0x0000ffd0 @ 0x0000ffd0-6)
e scr.color=3
e hex.comments=true
.(dump)
?e
e scr.color=0
.(dump)
?e
e hex.comments=false
e io.unalloc.ch=?
.(dump)
?e
e io.unalloc.ch=
.(dump)
EOF
EXPECT=<<EOF
- offset - 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF comment
0x0000ffca .... .... .... .... .... .... .... ....                 
0x0000ffda .... .... .... .... .... .... .... ....                 
0x0000ffea .... .... .... .... .... .... .... ....                 
0x0000fffa .... .... .... 7f45 4c46 0100 0000 0000       .ELF...... ; segment.ehdr ; [01] -rw- segment size 45 named ehdr
0x0001000a 0000 0000 0100 0200 0300 2000 0100 2000 .......... ... .
0x0001001a 0100 0400 0000 b32a 31c0 40cd 8000 3400 .......*1.@...4. ; entry0
0x0001002a 2000 0100 0000 0000 0000 0000 0000 0000  ...............
0x0001003a 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0001004a 0000 0000 0000 0000 0000 0000 0000 0000 ................
- offset - 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF comment
0x0000ffca .... .... .... .... .... .... .... ....
0x0000ffda .... .... .... .... .... .... .... ....
0x0000ffea .... .... .... .... .... .... .... ....
0x0000fffa .... .... .... 7f45 4c46 0100 0000 0000 .ELF...... ; segment.ehdr ; [01] -rw- segment size 45 named ehdr
0x0001000a 0000 0000 0100 0200 0300 2000 0100 2000 .......... ... .
0x0001001a 0100 0400 0000 b32a 31c0 40cd 8000 3400 .......*1.@...4. ; entry0
0x0001002a 2000 0100 0000 0000 0000 0000 0000 0000 ...............
0x0001003a 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0001004a 0000 0000 0000 0000 0000 0000 0000 0000 ................
- offset - 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF
0x0000ffca ???? ???? ???? ???? ???? ???? ???? ????
0x0000ffda ???? ???? ???? ???? ???? ???? ???? ????
0x0000ffea ???? ???? ???? ???? ???? ???? ???? ????
0x0000fffa ???? ???? ???? 7f45 4c46 0100 0000 0000 .ELF......
0x0001000a 0000 0000 0100 0200 0300 2000 0100 2000 .......... ... .
0x0001001a 0100 0400 0000 b32a 31c0 40cd 8000 3400 .......*1.@...4.
0x0001002a 2000 0100 0000 0000 0000 0000 0000 0000 ...............
0x0001003a 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0001004a 0000 0000 0000 0000 0000 0000 0000 0000 ................
- offset - 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF
0x0000ffca
0x0000ffda
0x0000ffea
0x0000fffa 7f45 4c46 0100 0000 0000 .ELF......
0x0001000a 0000 0000 0100 0200 0300 2000 0100 2000 .......... ... .
0x0001001a 0100 0400 0000 b32a 31c0 40cd 8000 3400 .......*1.@...4.
0x0001002a 2000 0100 0000 0000 0000 0000 0000 0000 ...............
0x0001003a 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0001004a 0000 0000 0000 0000 0000 0000 0000 0000 ................
EOF
RUN
NAME=pxr
BROKEN=1
FILE=../bins/elf/crackme
EXPECT=<<EOF
0x00600ae0 0x000000000040055e ^.@..... @reloc.printf 4195678 (.plt) R X 'push 0'
0x00600ae8 0x000000000040056e n.@..... @reloc.puts 4195694 (.plt) R X 'push 1'
0x00600af0 0x000000000040057e ~.@..... @reloc.__libc_start_main 4195710 (.plt) R X 'push 2'
0x00600af8 0x000000000040058e ..@..... @reloc.fgets 4195726 (.plt) R X 'push 3'
0x00600b00 0x000000000040059e ..@..... @reloc.strcmp 4195742 (.plt) R X 'push 4'
0x00600b08 0x00000000004005ae ..@..... @reloc.fflush 4195758 (.plt) R X 'push 5'
EOF
CMDS=<<EOF
pxr 0x30@0x00600ae0
EOF
RUN