Skip to content

Commit abe3e5a

Browse files
authored
Merge pull request #7 from intelowlproject/develop
fix to resolve client issues when requesting all analyzers
2 parents 3d2b12f + 13a171a commit abe3e5a

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

intel_owl_client.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ def intel_owl_client():
5252

5353
logger = get_logger(args.debug, args.log_to_file)
5454

55+
_pyintelowl_logic(args, logger)
56+
57+
58+
def _pyintelowl_logic(args, logger):
5559
md5 = None
5660
results = []
5761
elapsed_time = None
@@ -92,8 +96,10 @@ def intel_owl_client():
9296
logger.info("about to request ask_analysis_availability for md5: {}, analyzers: {}"
9397
"".format(md5, args.analyzers_list))
9498

95-
api_request_result = pyintelowl_client.ask_analysis_availability(md5, args.analyzers_list,
96-
args.check_reported_analysis_too)
99+
api_request_result = \
100+
pyintelowl_client.ask_analysis_availability(md5, args.analyzers_list,
101+
args.run_all_available_analyzers,
102+
args.check_reported_analysis_too)
97103
errors = api_request_result.get('errors', [])
98104
if errors:
99105
raise IntelOwlClientException("API ask_analysis_availability failed. Errors: {}"

pyintelowl/pyintelowl.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,24 @@ def session(self):
3030
session.verify = self.certificate
3131
session.headers.update({
3232
'Authorization': 'Token {}'.format(self.api_key),
33-
'User-Agent': 'IntelOwlClient/0.2.0',
33+
'User-Agent': 'IntelOwlClient/0.2.1',
3434
})
3535
self._session = session
3636

3737
return self._session
3838

39-
def ask_analysis_availability(self, md5, analyzers_needed, check_reported_analysis_too=False):
39+
def ask_analysis_availability(self, md5, analyzers_needed,
40+
run_all_available_analyzers=False,
41+
check_reported_analysis_too=False):
4042
answer = {}
4143
errors = []
4244
try:
4345
params = {
4446
"md5": md5,
4547
"analyzers_needed": analyzers_needed
4648
}
49+
if run_all_available_analyzers:
50+
params['run_all_available_analyzers'] = True
4751
if not check_reported_analysis_too:
4852
params['running_only'] = True
4953
url = self.instance + "/api/ask_analysis_availability"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# This call to setup() does all the work
1111
setup(
1212
name="pyintelowl",
13-
version="0.2.0",
13+
version="0.2.1",
1414
description="Client and Library for Intel Owl",
1515
long_description=README,
1616
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)