Skip to content

Commit

Permalink
Merge pull request #1087 from jlopezzarza/feature/maltiverse-enable-auth
Browse files Browse the repository at this point in the history
Add authentication option for Maltiverse
  • Loading branch information
jeromeleonard authored Jul 22, 2022
2 parents d73a77c + fa7c37b commit 414c85f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
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

0 comments on commit 414c85f

Please sign in to comment.