- Introduce the following new methods: * `rz_analysis_similarity_basic_block()` * `rz_analysis_similarity_function()` * `rz_analysis_similarity_basic_block_2()` * `rz_analysis_similarity_function_2()` * `rz_analysis_match_basic_blocks()` * `rz_analysis_match_functions()` * `rz_analysis_match_basic_blocks_2()` * `rz_analysis_match_functions_2()` - Remove `RzAnalysisDiff` and its usages - Remove `librz/analysis/diff.c` entirely to and adds `librz/analysis/similarity.c` - Remove a lot of unused structures and simplified the code by a lot - Fix typo in levenshtein - Remove `librz/core/gdiff.c` and `gdiff` functions since they were unused or only used in rz-diff - Remove `difftype` (or "color") from `RzANode` which lead to dead code - Decrease serialized data in projects. - Add `RzAnalysisVarKind` and `RzAnalysisVarType` and replaces all the hardcoded values - Remove command `agd` - Remove all `rz_core_gdiff` usages from `rz_core.h` - Refactor `rz_analysis_var_list` and `rz_analysis_var_count` due unused argument (`RzAnalysis` was not used) - Add new method `rz_analysis_var_count_total` to simplify some usages - Remove `rz_core_graph_diff` - Add `typedef RzAnalysisFcnType` on `enum``used for function types - Remove unused `RZ_ANALYSIS_FCN_VARKIND_LOCAL` - Remove from `RzAnalysisFunction` the following variables: * `fingerprint` * `fingerprint_size` * `diff` * `diff_ops` * `diff_thbb` * `diff_thfcn` - Remove from `RzAnalysisBlock` the following variables: * `fingerprint` * `diff` - Remove `RZ_ANALYSIS_THRESHOLDBB` and `RZ_ANALYSIS_THRESHOLDFCN` - Remove the following callbacks from `RzAnalysisPlugin` * `RzAnalysisDiffBBCallback` * `RzAnalysisDiffFcnCallback` * `RzAnalysisDiffEvalCallback` - Fix fancy table columns/rows when a color string is in a cell - Bumped project version to 9
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
|
|
?e
|
|
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: 32
|
|
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
|
|
?e
|
|
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
|