Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
moonpatel committed Mar 29, 2024
1 parent cf7358c commit 7d1f4b1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
"disabled": False,
"soft_time_limit": 60,
"routing_key": "default",
"health_check_status": True,
"health_check_status": False,
"type": "observable",
"docker_based": False,
"maximum_tlp": "RED",
"maximum_tlp": "AMBER",
"observable_supported": ["ip"],
"supported_filetypes": [],
"run_hash": False,
Expand Down
21 changes: 10 additions & 11 deletions api_app/analyzers_manager/observable_analyzers/abusix.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,12 @@
class Abusix(classes.ObservableAnalyzer):
def run(self):
result = {}
try:
ip_addr = self.observable_name
cf = querycontacts.ContactFinder()
abuse_contacts = cf.find(ip_addr)
if not abuse_contacts:
abuse_contacts = []
result["abuse_contacts"] = abuse_contacts
except Exception as e:
logger.error(e)
result["error"] = e
ip_addr = self.observable_name
cf = querycontacts.ContactFinder()
abuse_contacts = cf.find(ip_addr)
if not abuse_contacts:
abuse_contacts = []
result["abuse_contacts"] = abuse_contacts
return result

def update(self) -> bool:
Expand All @@ -33,7 +29,10 @@ def update(self) -> bool:
def _monkeypatch(cls):
patches = [
if_mock_connections(
patch("querycontacts.ContactFinder.find", return_value=[])
patch(
"querycontacts.ContactFinder.find",
return_value=["[email protected]"],
)
)
]
return super()._monkeypatch(patches=patches)

This file was deleted.

0 comments on commit 7d1f4b1

Please sign in to comment.