Skip to content

Commit

Permalink
Release cortexutils 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Jun 29, 2017
1 parent cb1a1cd commit 6316785
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
23 changes: 13 additions & 10 deletions contrib/cortexutils/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,19 @@ def __set_proxies(self):
os.environ['https_proxy'] = self.https_proxy

def __set_encoding(self):
if sys.stdout.encoding != 'UTF-8':
if sys.version_info[0] == 3:
sys.stdout = codecs.getwriter('utf-8')(sys.stdout.buffer, 'strict')
else:
sys.stdout = codecs.getwriter('utf-8')(sys.stdout, 'strict')
if sys.stderr.encoding != 'UTF-8':
if sys.version_info[0] == 3:
sys.stderr = codecs.getwriter('utf-8')(sys.stderr.buffer, 'strict')
else:
sys.stderr = codecs.getwriter('utf-8')(sys.stderr, 'strict')
try:
if sys.stdout.encoding != 'UTF-8':
if sys.version_info[0] == 3:
sys.stdout = codecs.getwriter('utf-8')(sys.stdout.buffer, 'strict')
else:
sys.stdout = codecs.getwriter('utf-8')(sys.stdout, 'strict')
if sys.stderr.encoding != 'UTF-8':
if sys.version_info[0] == 3:
sys.stderr = codecs.getwriter('utf-8')(sys.stderr.buffer, 'strict')
else:
sys.stderr = codecs.getwriter('utf-8')(sys.stderr, 'strict')
except:
pass

def __get_param(self, source, name, default=None, message=None):
"""Extract a specific parameter from given source.
Expand Down
3 changes: 2 additions & 1 deletion contrib/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='cortexutils',
version='1.1.1',
version='1.2.0',
description='A Python library for including utility classes for Cortex analyzers',
long_description=open('README').read(),
author='TheHive-Project',
Expand All @@ -21,6 +21,7 @@
'Topic :: Security',
'Topic :: Software Development :: Libraries :: Python Modules'],
py_modules=[
'future',
'cortexutils.analyzer',
'cortexutils.extractor'
],
Expand Down

0 comments on commit 6316785

Please sign in to comment.