You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cortexutils crashes on version check if python < 2.7
Request Type
Bug
Work Environment
Question
Answer
OS version (server)
RedHat 6.8
OS version (client)
Seven
Cortex Analyzer Name
cortexutils
Cortex Analyzer Version
1.0
Cortex Version
1.0.0, hash of the commit
Browser type & version
N/A
Problem Description
When using Python 2.6.6, analysers crash with the following error:
"errorMessage": "Error: Invalid output\nTraceback (most recent call last):\n File "./virustotal.py", line 135, in \n VirusTotalAnalyzer().run()\n File "./virustotal.py", line 16, in init\n Analyzer.init(self)\n File "/usr/lib/python2.6/site-packages/cortexutils-1.0.0-py2.6.egg/cortexutils/analyzer.py", line 16, in init\n self.setEncoding()\n File "/usr/lib/python2.6/site-packages/cortexutils-1.0.0-py2.6.egg/cortexutils/analyzer.py", line 38, in setEncoding\n if sys.version_info.major == 3:\nAttributeError: 'tuple' object has no attribute 'major'\n"
Steps to Reproduce
Install/configure thehive
Install/configure cortex
Connect thehive to MISP
Run analyzers against an observable
Possible Solutions
In cortexutils/analyzer.py lines 38 and 44
Replace:
if sys.version_info.major == 3:
with
if sys.version_info[0] == 3:
The text was updated successfully, but these errors were encountered:
Hi @hybiepoo, thanks for this catch. We can fix that in cortexutils in fat, but I don't know if all the dependencies used by the analyzers will work with a python version < 2.7.
Did you update cortexutils locally to fix this version check? Did you try the analyzers with a Python < 2.7?
Yes the change fixed it for me. I'm not sure about all the analysers yet as I'm not sure we have keys for them. The geo lookup definitely worked. Will look more into it Monday. Unfortunately our base os is RHEL, but may have to request exemption and just run Ubuntu for MISP/TheHive.
Cortexutils crashes on version check if python < 2.7
Request Type
Bug
Work Environment
Problem Description
When using Python 2.6.6, analysers crash with the following error:
"errorMessage": "Error: Invalid output\nTraceback (most recent call last):\n File "./virustotal.py", line 135, in \n VirusTotalAnalyzer().run()\n File "./virustotal.py", line 16, in init\n Analyzer.init(self)\n File "/usr/lib/python2.6/site-packages/cortexutils-1.0.0-py2.6.egg/cortexutils/analyzer.py", line 16, in init\n self.setEncoding()\n File "/usr/lib/python2.6/site-packages/cortexutils-1.0.0-py2.6.egg/cortexutils/analyzer.py", line 38, in setEncoding\n if sys.version_info.major == 3:\nAttributeError: 'tuple' object has no attribute 'major'\n"
Steps to Reproduce
Possible Solutions
In cortexutils/analyzer.py lines 38 and 44
Replace:
if sys.version_info.major == 3:
with
if sys.version_info[0] == 3:
The text was updated successfully, but these errors were encountered: