radare2/test/db/tools/ragg2

188 lines
4.0 KiB
Plaintext

NAME=ragg2 -a x86 -b 64 -e 'main@global{main(123)}'
FILE=-
CMDS=!ragg2 -a x86 -b 64 -e 'main@global{main(123)}'
EXPECT=<<EOF
48c7c07b00000050c3
EOF
RUN
NAME=ragg2 -a x86 -b 64 -p A200 -d 50:0xccccccb
FILE=-
CMDS=!ragg2 -a x86 -b 64 -p A200 -d 50:0xccccccb
EXPECT=<<EOF
4141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141cbcccc0c4141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141
EOF
RUN
NAME=ragg2 -a x86 -b 64 -p A200 -d 50:0xcb
FILE=-
CMDS=!ragg2 -a x86 -b 64 -p A200 -d 50:0xcb
EXPECT=<<EOF
4141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141cb0000004141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141
EOF
RUN
NAME=ragg2 -a x86 -b 64 -p A10 -d 50:0xcb
FILE=-
CMDS=!ragg2 -a x86 -b 64 -p A10 -d 50:0xcb
EXPECT=<<EOF
41414141414141414141
EOF
EXPECT_ERR=<<EOF
ERROR: Cannot patch outside
EOF
RUN
NAME=ragg2 -a x86 -b 64 -p A20 -w 10:cb
FILE=-
CMDS=!ragg2 -a x86 -b 64 -p A20 -w 10:cb
EXPECT=<<EOF
41414141414141414141cb414141414141414141
EOF
RUN
NAME=ragg2 -a x86 -b 64 -p A20 -D 10:33
FILE=-
CMDS=!ragg2 -a x86 -b 64 -p A20 -D 10:33
EXPECT=<<EOF
4141414141414141414121000000000000004141
EOF
RUN
NAME=ragg2 -a x86 -b 64 -p n2t2a2s2
FILE=-
CMDS=!ragg2 -a x86 -b 64 -p n2t2a2s2
EXPECT=<<EOF
00004141cccc9090
EOF
RUN
NAME=ragg2 -i exec -z -a x86 -b32
FILE=-
CMDS=!ragg2 -i exec -z -k linux -a x86 -b32
EXPECT=<<EOF
"\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x50\x53\x89\xe1\x99\xb0\x0b\xcd\x80"
EOF
RUN
NAME=ragg2 -k linux -i exec -a x86 -b32 -p n3N3
FILE=-
CMDS=!ragg2 -k linux -i exec -a x86 -b32 -p n3N3
EXPECT=<<EOF
90909031c050682f2f7368682f62696e89e3505389e199b00bcd80909090
EOF
RUN
NAME=ragg2 -p n80 -w 79:c3 -x
FILE=-
CMDS=!ragg2 -p n80 -w 79:c3 -x
EXPECT=<<EOF
EOF
RUN
NAME=ragg2 -q 0x45414146
FILE=-
CMDS=!ragg2 -q 0x45414146
EXPECT=<<EOF
Little endian: -1
Big endian: 12
EOF
RUN
NAME=ragg2 -q 45414146
FILE=-
CMDS=!ragg2 -q 45414146
EXPECT=<<EOF
EOF
RUN
NAME=ragg2 -k linux -a x86 -b32 simple_cmp.r
BROKEN=1
FILE=-
CMDS=!ragg2 -k linux -a x86 -b32 bins/other/ragg2/simple_cmp.r
EXPECT=<<EOF
5589e581ec80000000c745086869210ac7450c6e000000c74510000000008d4508898504000000c7450501000000c745060200000055583b45060f8f5a0000006a04546a018b1c248b8c24040000008b942408000000b804000000cd8083c40c6a008b1c24b801000000cd8083c40481c4800000005dc3
EOF
RUN
NAME=ragg2 bugg8.r
FILE=-
CMDS=!ragg2 bins/other/ragg2/bugg8.r > /dev/null
EXPECT=<<EOF
EOF
RUN
#CLANG=e900000000488d3524000000bf01000000b80400000248c7c2070000000f05b80100000248c7c7000000000f0531c0c348656c6c6f210a00
NAME=ragg2c bins/other/ragg2/hi.c
BROKEN=1
FILE=-
CMDS=!ragg2 bins/other/ragg2/hi.c | grep e9
EXPECT=<<EOF
e90800000048656c6c6f210a00bf01000000488d35ecffffffba07000000b8010000000f05b83c0000004030ff0f05c3
EOF
RUN
NAME=ragg2 -v
FILE=-
CMDS=!ragg2 -v | grep -c build
EXPECT=<<EOF
1
EOF
RUN
NAME=ragg2 -h
FILE=-
CMDS=!ragg2 -h | grep -c Usage
EXPECT=<<EOF
1
EOF
RUN
NAME=ragg2 -L
FILE=-
CMDS=!ragg2 -L | grep -c encoders
EXPECT=<<EOF
1
EOF
RUN
NAME=ragg2 empty file
FILE=-
CMDS=!ragg2 ""
EXPECT_ERR=<<EOF
ERROR: Cannot open empty path
EOF
RUN
NAME=ragg2 empty include
FILE=bins/other/ragg2/hi.c
CMDS=!ragg2 -I "" bins/other/ragg2/hi.c
EXPECT_ERR=<<EOF
ERROR: Cannot open empty include path
EOF
RUN
NAME=ragg2 empty contents
FILE=bins/other/ragg2/hi.c
CMDS=!ragg2 -C "" bins/other/ragg2/hi.c
EXPECT_ERR=<<EOF
ERROR: Cannot open empty contents path
EOF
RUN
NAME=ragg2 debruijn sequence 1
FILE=-
CMDS=!ragg2 -r -P 2; ?e
EXPECT=<<EOF
AA
EOF
RUN
NAME=ragg2 debruijn sequence 2
FILE=-
CMDS=!ragg2 -P 2 -r; ?e
EXPECT=<<EOF
AA
EOF
RUN