Hello,
I was in the process of installing the CylancePROTECT App for Splunk and came across an issue that appears to be python related.
I ran the test.py script with the built in Python 2.7 from Splunk and receiving the following error:
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
File "/opt/splunk/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/opt/splunk/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
File "/opt/splunk/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/opt/splunk/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha1
Traceback (most recent call last):
File "./test.py", line 13, in
from protect import get_data
File "/opt/splunk/etc/apps/cylance_protect/src/protect.py", line 17, in
from spreadsheet import read_csv_file, write_csv_file
File "/opt/splunk/etc/apps/cylance_protect/src/spreadsheet.py", line 13, in
import requests
File "/opt/splunk/lib/python2.7/site-packages/requests/__init__.py", line 58, in
from . import utils
File "/opt/splunk/lib/python2.7/site-packages/requests/utils.py", line 25, in
from .compat import parse_http_list as _parse_list_header
File "/opt/splunk/lib/python2.7/site-packages/requests/compat.py", line 7, in
from .packages import chardet
File "/opt/splunk/lib/python2.7/site-packages/requests/packages/__init__.py", line 3, in
from . import urllib3
File "/opt/splunk/lib/python2.7/site-packages/requests/packages/urllib3/__init__.py", line 16, in
from .connectionpool import (
File "/opt/splunk/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 36, in
from .connection import (
File "/opt/splunk/lib/python2.7/site-packages/requests/packages/urllib3/connection.py", line 43, in
from .util import (
File "/opt/splunk/lib/python2.7/site-packages/requests/packages/urllib3/util/__init__.py", line 10, in
from .ssl_ import (
File "/opt/splunk/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py", line 2, in
from hashlib import md5, sha1
ImportError: cannot import name md5
It looks like Python 2.7 that comes with Splunk have incompatible libraries.
This thread is probably dead since it dates back to 2016.
If anyone else runs into this or any other issue, there is a great troubleshooting section in the installation guide that was constructed based on support tickets. This now corrects nearly all issues with a concise troubleshooting process. If it does not resolve your issue, there is also contact information in the guide as well. If your issue is resolved, please feel free to mark the question as answered. Thank you!
Hi,
Please refer to the README.md (which is part of the app which you downloaded). At the end if this file is a section about how to report issues.
Thanks.