Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add authentication option for Maltiverse #1087

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions analyzers/Maltiverse/Maltiverse_Report.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@
"multi": false,
"required": false,
"defaultValue": 60
},
{
"name": "api_key",
"description": "Auth token to use when requesting data to Maltiverse",
"type": "string",
"multi": false,
"required": false,
"defaultValue": ""
}
],
"registration_required": false,
Expand Down
7 changes: 3 additions & 4 deletions analyzers/Maltiverse/maltiverse-client.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ class MaltiverseAnalyzer(Analyzer):
def __init__(self):
Analyzer.__init__(self)
self.service = self.get_param('config.service', None, 'Service parameter is missing')
# self.username = self.get_param('config.username', None, 'Missing Maltiverse API Username')
# self.password = self.get_param('config.password', None, 'Missing Maltiverse API Password')
self.polling_interval = self.get_param('config.polling_interval', 60)
self.proxies = self.get_param('config.proxy', None)
self.m = Maltiverse()
self.api_key = self.get_param('config.api_key', None)
self.m = Maltiverse(auth_token=self.api_key)

def maltiverse_query_ip(self, data):
try:
Expand Down Expand Up @@ -108,7 +107,7 @@ def summary(self, raw):
level = "safe"
value = "{}".format(raw["classification"])


taxonomies.append(self.build_taxonomy(level, namespace, predicate, value))

return {"taxonomies": taxonomies}
Expand Down