mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-24 13:49:50 +00:00
223 lines
3.4 KiB
Plaintext
223 lines
3.4 KiB
Plaintext
NAME=pd call sym bug
|
|
FILE=../bins/mach0/hello-objc-arm
|
|
EXPECT=<<EOF
|
|
1
|
|
1
|
|
EOF
|
|
CMDS=<<EOF
|
|
e asm.lines.bb=0
|
|
e asm.bytes=0
|
|
e asm.comments=0
|
|
s sym.static_int_Test::callMeNot
|
|
pd 20~?NSLog
|
|
af
|
|
pd 20~?NSLog
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pd arm cortex 0
|
|
FILE=-
|
|
EXPECT=<<EOF
|
|
invalid
|
|
EOF
|
|
ARGS=-a arm -b 16
|
|
CMDS=wx 80f30988; pi 1
|
|
RUN
|
|
|
|
NAME=pd arm cortex 1
|
|
FILE=-
|
|
EXPECT=<<EOF
|
|
msr psp, r0
|
|
EOF
|
|
ARGS=-a arm -b 16 -e asm.cpu=cortex
|
|
CMDS=wx 80f30988;pi 1
|
|
RUN
|
|
|
|
NAME=pd arm cortex 2
|
|
FILE=-
|
|
EXPECT=<<EOF
|
|
msr psp, r0
|
|
EOF
|
|
ARGS=-a arm -b 16
|
|
CMDS=e asm.cpu=cortex;wx 80f30988;pi 1
|
|
RUN
|
|
|
|
NAME=pd call sym bug
|
|
FILE=../bins/mach0/hello-objc-arm
|
|
EXPECT=<<EOF
|
|
push {r7, lr}
|
|
mov r7, sp
|
|
EOF
|
|
CMDS=<<EOF
|
|
e asm.lines.bb=0
|
|
e asm.bytes=0
|
|
e asm.comments=0
|
|
s sym.static_int_Test::callMeNot
|
|
# s+2
|
|
pi 2
|
|
EOF
|
|
RUN
|
|
|
|
NAME=call fcn eip 32bit
|
|
FILE=../bins/elf/analysis/ls-alxchk
|
|
EXPECT=<<EOF
|
|
0x00005f16 e835ffffff call fcn.00005e50
|
|
EOF
|
|
CMDS=<<EOF
|
|
s 0x5e50
|
|
e asm.bits=32
|
|
af; afn eip
|
|
pd 1 @ 0x5f16~:0
|
|
e asm.lines.bb=0
|
|
e asm.bytes=0
|
|
e asm.comments=0
|
|
EOF
|
|
RUN
|
|
|
|
NAME=call fcn eip 64bit
|
|
FILE=../bins/elf/analysis/ls-alxchk
|
|
BROKEN=1
|
|
EXPECT=<<EOF
|
|
| 0x00005f16 e835ffffff call fcn.eip
|
|
EOF
|
|
CMDS=<<EOF
|
|
s 0x5e50
|
|
e asm.bits=64
|
|
af; afn eip
|
|
pd 1 @ 0x5f16~:0
|
|
e asm.lines.bb=0
|
|
e asm.bytes=0
|
|
e asm.comments=0
|
|
EOF
|
|
RUN
|
|
|
|
NAME=call fcn rip 64bit
|
|
FILE=../bins/elf/analysis/ls-alxchk
|
|
EXPECT=<<EOF
|
|
0x00005f16 e835ffffff call fcn.00005e50
|
|
EOF
|
|
CMDS=<<EOF
|
|
s 0x5e50
|
|
e asm.bits=64
|
|
af; afn rip
|
|
pd 1 @ 0x5f16~:0
|
|
e asm.lines.bb=0
|
|
e asm.bytes=0
|
|
e asm.comments=0
|
|
EOF
|
|
RUN
|
|
|
|
NAME=lea edx bug segfault for x86 32bit #5710@radare2
|
|
FILE=malloc://128
|
|
EXPECT=<<EOF
|
|
0x00000000 8d15d0830408 lea edx, [0x80483d0]
|
|
EOF
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=32
|
|
e asm.lines.bb=false
|
|
e asm.comments=false
|
|
pD@x:8d15d0830408
|
|
EOF
|
|
RUN
|
|
|
|
NAME=p8@x
|
|
FILE=malloc://128
|
|
EXPECT=<<EOF
|
|
8d15d0830408
|
|
EOF
|
|
CMDS=<<EOF
|
|
e asm.comments=false
|
|
p8@x:8d15d0830408
|
|
EOF
|
|
RUN
|
|
|
|
NAME=px@x
|
|
FILE=malloc://128
|
|
EXPECT=<<EOF
|
|
0x00000000 8d15 d083 0408 ......
|
|
EOF
|
|
CMDS=<<EOF
|
|
e asm.comments=false
|
|
e hex.header=false
|
|
px@x:8d15d0830408
|
|
EOF
|
|
RUN
|
|
|
|
NAME=size of function in elf x64 stub
|
|
FILE=../bins/other/radiff2/hellocxx-osx-fat-intel_1
|
|
EXPECT=<<EOF
|
|
6
|
|
EOF
|
|
CMDS=<<EOF
|
|
s 0x100000dae
|
|
af
|
|
afi~^size[1]
|
|
EOF
|
|
RUN
|
|
|
|
NAME=crackme test
|
|
FILE=../bins/elf/crackme
|
|
EXPECT=<<EOF
|
|
;-- entry0:
|
|
;-- section..text:
|
|
;-- .text:
|
|
;-- _start:
|
|
0x004005c0 31ed xor ebp, ebp ; [14] -r-x section size 584 named .text
|
|
0x004005c2 4989d1 mov r9, rdx
|
|
xor ebp, ebp
|
|
mov r9, rdx
|
|
EOF
|
|
CMDS=<<EOF
|
|
pd 2
|
|
pi 2
|
|
EOF
|
|
RUN
|
|
|
|
NAME=indent asm.lines.fcn=0, asm.lines.bb=1 for issue 9316
|
|
FILE=-
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=64
|
|
af+ 0 test
|
|
e asm.lines.fcn=0
|
|
e asm.lines.bb=1
|
|
pd 2
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0: test ();
|
|
0x00000000 0000 add byte [rax], al
|
|
0x00000002 0000 add byte [rax], al
|
|
EOF
|
|
RUN
|
|
|
|
NAME=indent asm.lines.fcn=1, asm.lines.bb=0 for issue 9316
|
|
FILE=-
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=64
|
|
af+ 0 test
|
|
e asm.lines.fcn=1
|
|
e asm.lines.bb=0
|
|
pd 2
|
|
EOF
|
|
EXPECT=<<EOF
|
|
/ 0: test ();
|
|
0x00000000 0000 add byte [rax], al
|
|
0x00000002 0000 add byte [rax], al
|
|
EOF
|
|
RUN
|
|
|
|
NAME=asm.flgoff indent
|
|
FILE=../bins/elf/crackme0x05
|
|
CMDS=<<EOF
|
|
e asm.flags.offset=1
|
|
s sym.check
|
|
pd 1
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x080484c8 ;-- check:
|
|
0x080484c8 55 push ebp
|
|
EOF
|
|
RUN
|