mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-14 02:28:23 +00:00
Fixed one of the small display bug in DUplicate_ssdeep_v2 (was displaying [tlsh, tlsh] instead of simply tlsh)
This commit is contained in:
parent
a4595010c0
commit
943016d6ca
2 changed files with 7 additions and 2 deletions
|
@ -117,7 +117,11 @@ if __name__ == "__main__":
|
||||||
for hash_type, paste_hash in paste_hashes.iteritems():
|
for hash_type, paste_hash in paste_hashes.iteritems():
|
||||||
for dico_hash in curr_dico_redis.smembers('HASHS_'+hash_type):
|
for dico_hash in curr_dico_redis.smembers('HASHS_'+hash_type):
|
||||||
try:
|
try:
|
||||||
percent = 100-ssdeep.compare(dico_hash, paste_hash) if hash_type == 'ssdeep' else tlsh.diffxlen(dico_hash, paste_hash)
|
if hash_type == 'ssdeep':
|
||||||
|
percent = 100-ssdeep.compare(dico_hash, paste_hash)
|
||||||
|
else:
|
||||||
|
percent = tlsh.diffxlen(dico_hash, paste_hash)
|
||||||
|
|
||||||
threshold_duplicate = threshold_set[hash_type]
|
threshold_duplicate = threshold_set[hash_type]
|
||||||
if percent < threshold_duplicate:
|
if percent < threshold_duplicate:
|
||||||
percent = 100 - percent if hash_type == 'ssdeep' else percent #recovert the correct percent value for ssdeep
|
percent = 100 - percent if hash_type == 'ssdeep' else percent #recovert the correct percent value for ssdeep
|
||||||
|
|
|
@ -101,6 +101,7 @@ def parseStringToList2(the_string):
|
||||||
for i in range(1, len(tab_str)-2):
|
for i in range(1, len(tab_str)-2):
|
||||||
tab_str[i] = '['+tab_str[i]+']'
|
tab_str[i] = '['+tab_str[i]+']'
|
||||||
res.append(parseStringToList(tab_str[i]))
|
res.append(parseStringToList(tab_str[i]))
|
||||||
|
if len(tab_str) > 1:
|
||||||
res.append(parseStringToList(tab_str[len(tab_str)-1]))
|
res.append(parseStringToList(tab_str[len(tab_str)-1]))
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue