-
Notifications
You must be signed in to change notification settings - Fork 385
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
GoogleSafebrowsing Analyzer Fails with AttributeErrors #92
Comments
Have you updated cortexutils? Because https://github.com/CERT-BDF/Cortex-Analyzers/blob/master/contrib/cortexutils/analyzer.py definitely implements (Edit: and get_data, of course) |
Yes this looks like an outdated version of |
@denied39 can you please try the following steps:
|
Another error source might be a different python installation/version. Something like, you installed cortexutils for python3 but use python2 for executing the analyzers. That can happen if the |
Cool, thanks to @3c7 too |
GoogleSafebrowsing Analyzer Fails with AttributeErrors
Request Type
Bug
Work Environment
Description
After adding in the GoogleSafebrowsing API key, the analyzer fails with multiple AttributeErrors.
First failure:
Error: Invalid output Traceback (most recent call last): File "./safebrowsing_analyzer.py", line 61, in SafebrowsingAnalyzer().run() File "./safebrowsing_analyzer.py", line 12, in init self.api_key = self.get_param('config.key', None, 'No Google API key provided.') AttributeError: SafebrowsingAnalyzer instance has no attribute 'get_param'
(after fixing that)
Second failure:
Error: Invalid output Traceback (most recent call last): File "./safebrowsing_analyzer.py", line 61, in SafebrowsingAnalyzer().run() File "./safebrowsing_analyzer.py", line 51, in run result = self.sb.query_url(self.get_data()) AttributeError: SafebrowsingAnalyzer instance has no attribute 'get_data'
Steps to Reproduce
(keep this section only if the issue relates to a bug)
Possible Solutions
First Error:
Change get_param on lines 12-13 of safebrowsing_analyzer.py to getParam
Second Error:
Change get_data on line 51 of safebrowsing_analyzer.py to getData
Complementary information
After making the above changes, the analyzer now runs without error.
The text was updated successfully, but these errors were encountered: