Skip to content

Commit

Permalink
Fixed calculations and a little UI change
Browse files Browse the repository at this point in the history
GUI: Do not make people blind by showing a so strong red colour for likely false positive matches. Instead, show a soft orange colour.
BUG: Do not consider negative ratios for calculating the minimum value for internal calculations.
  • Loading branch information
joxeankoret committed Dec 8, 2018
1 parent a372a2f commit 917c4c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sourceimp_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ def find_initial_rows(self):
self.add_match(match_id, func_ea, match_name, heur_name.capitalize(),
score, reasons, ml, qr)

if score < min_score:
if score < min_score and score > 0.0:
min_score = score
if score > max_score:
max_score = score
Expand Down
3 changes: 2 additions & 1 deletion sourceimp_ida.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@

#-------------------------------------------------------------------------------
_DEBUG = False
LITTLE_ORANGE = 0x026AFD

#-------------------------------------------------------------------------------
def log(msg):
Expand Down Expand Up @@ -310,7 +311,7 @@ def OnGetLineAttr(self, n):
if not bin_name.startswith("sub_"):
src_name = line[2].strip("_").strip(".")
if bin_name.find(src_name) == -1:
return [0x0000FF, 0]
return [LITTLE_ORANGE, 0]

ratio = max(float(line[5]), float(line[7]))
red = abs(int(164 * (1 - ratio)))
Expand Down

0 comments on commit 917c4c2

Please sign in to comment.