Restoring scr.prompt might break rz-pipe if you open a project from within rz-pipe. Exclude scr.prompt so that it is not set to true in such cases.
48 lines
1.1 KiB
Text
48 lines
1.1 KiB
Text
NAME=pipe args
|
|
FILE==
|
|
CMDS=#!pipe echo hello world
|
|
EXPECT=<<EOF
|
|
hello world
|
|
EOF
|
|
RUN
|
|
|
|
NAME=rzpipe.py
|
|
FILE=bins/elf/_Exit (42)
|
|
CMDS=<<EOF
|
|
?q `env~?^ASAN=1$`
|
|
?+ env LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.5
|
|
#!pipe python3 scripts/get-funcs.py
|
|
EOF
|
|
EXPECT=<<EOF
|
|
|
|
Function names:
|
|
entry0
|
|
sym.imp._Exit
|
|
|
|
Disassembly of entry0:
|
|
;-- section..text:
|
|
;-- .text:
|
|
;-- _start():
|
|
/ entry0 ();
|
|
| 0x08049020 push ebp ; [10] -r-x section size 16 named .text
|
|
| 0x08049021 mov ebp, esp
|
|
| 0x08049023 sub esp, 8
|
|
| 0x08049026 sub esp, 0xc
|
|
| 0x08049029 push 0x2a ; '*' ; 42
|
|
\ 0x0804902b call sym.imp._Exit ; void _Exit(int status)
|
|
|
|
EOF
|
|
RUN
|
|
|
|
NAME=rzpipe load project
|
|
FILE=--
|
|
CMDS=<<EOF
|
|
?q `env~?^ASAN=1$`
|
|
?+ env LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.5
|
|
!python3 -c 'import rzpipe;rz=rzpipe.open("--");rz.cmd("Po bins/other/ls.rzdb");print(rz.cmd("?v custom_main"))'
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x4070
|
|
|
|
EOF
|
|
RUN
|