Skip to content

Commit 39346fa

Browse files
committed
fix: Correct isBlacklisted() return logic in OTX module
fix: Correct inverted return values in isBlacklisted() function The isBlacklisted() function had inverted logic - it returned False when a value was found in the blacklist and True when not found. This caused all non-blacklisted results to be filtered out throughout the module. Fixed by correcting the return values: - Returns True when value is found in blacklist (was False) - Returns False when value is not in blacklist (was True) This fixes enrichment failures in: - IP passive DNS lookups (getIP function) - Hash malware domain lookups (getHash function) - Domain enrichment (getDomain function) Tested with IP address passive DNS enrichment and confirmed hostnames are now returned correctly from the OTX API.
1 parent 860335e commit 39346fa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • misp_modules/modules/expansion

misp_modules/modules/expansion/otx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ def isBlacklisted(value):
6868

6969
for b in blacklist:
7070
if value in b:
71-
return False
71+
return True
7272

73-
return True
73+
return False
7474

7575

7676
def valid_ip(ip):

0 commit comments

Comments
 (0)