112 lines
1.7 KiB
Text
112 lines
1.7 KiB
Text
NAME=aF on ELF
|
|
FILE=bins/elf/msp430.elf
|
|
CMDS=<<EOF
|
|
s main
|
|
aF
|
|
pif
|
|
echo
|
|
afi
|
|
EOF
|
|
EXPECT=<<EOF
|
|
add #0xff9c, sp
|
|
mov #loc..strings, r15
|
|
call #loc.puts
|
|
mov sp, r15
|
|
call #loc.get_password
|
|
mov sp, r15
|
|
call #loc.check_password
|
|
tst r15
|
|
jnz $+0x000c
|
|
mov #0x44c7, r15
|
|
call #loc.puts
|
|
jmp $+0x000e
|
|
mov #0x44e4, r15
|
|
call #loc.puts
|
|
call #loc.unlock_door
|
|
clr r15
|
|
add #0x0064, sp
|
|
bis #0x00f0, sr
|
|
jmp $-0x0004
|
|
|
|
offset: 0x00004438
|
|
name: main
|
|
size: 62
|
|
is-pure: true
|
|
realsz: 62
|
|
stackframe: 0
|
|
cyclomatic-cost: 0
|
|
cyclomatic-complexity: 1
|
|
loops: 0
|
|
bits: 16
|
|
type: fcn
|
|
num-bbs: 5
|
|
edges: 6
|
|
end-bbs: 0
|
|
call-refs: 0x00004558 C 0x0000447a C 0x00004484 C 0x00004558 C 0x0000446a J 0x00004558 C 0x0000449c C 0x00004470 J
|
|
data-refs:
|
|
code-xrefs: 0x0000445c J 0x00004474 J
|
|
noreturn: false
|
|
in-degree: 2
|
|
out-degree: 6
|
|
data-xrefs:
|
|
locals: 0
|
|
args: 0
|
|
EOF
|
|
RUN
|
|
|
|
NAME=aF on same but ihex and .rz script
|
|
FILE=ihex://bins/microcorruption/tutorial
|
|
CMDS=<<EOF
|
|
. bins/microcorruption/tutorial.rz
|
|
s main
|
|
aF
|
|
pif
|
|
echo
|
|
afi
|
|
EOF
|
|
EXPECT=<<EOF
|
|
add #0xff9c, sp
|
|
mov #loc..strings, r15
|
|
call #loc.puts
|
|
mov sp, r15
|
|
call #loc.get_password
|
|
mov sp, r15
|
|
call #loc.check_password
|
|
tst r15
|
|
jnz $+0x000c
|
|
mov #str.Invalid_password_try_again, r15
|
|
call #loc.puts
|
|
jmp $+0x000e
|
|
mov #str.Access_Granted, r15
|
|
call #loc.puts
|
|
call #loc.unlock_door
|
|
clr r15
|
|
add #0x0064, sp
|
|
bis #0x00f0, sr
|
|
jmp $-0x0004
|
|
|
|
offset: 0x00004438
|
|
name: main
|
|
size: 62
|
|
is-pure: true
|
|
realsz: 62
|
|
stackframe: 0
|
|
cyclomatic-cost: 0
|
|
cyclomatic-complexity: 1
|
|
loops: 0
|
|
bits: 16
|
|
type: fcn
|
|
num-bbs: 5
|
|
edges: 6
|
|
end-bbs: 0
|
|
call-refs: 0x00004558 C 0x0000447a C 0x00004484 C 0x00004558 C 0x0000446a J 0x00004558 C 0x0000449c C 0x00004470 J
|
|
data-refs:
|
|
code-xrefs: 0x0000445c J 0x00004474 J
|
|
noreturn: false
|
|
in-degree: 2
|
|
out-degree: 6
|
|
data-xrefs:
|
|
locals: 0
|
|
args: 0
|
|
EOF
|
|
RUN
|