Skip to content

Commit

Permalink
HybridAnalysis Analyzer: Forces ssl validation, enclose filename in d…
Browse files Browse the repository at this point in the history
…ouble quotes (#323).
  • Loading branch information
3c7 committed Oct 23, 2018
1 parent 9276ff6 commit 7e754e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions analyzers/HybridAnalysis/HybridAnalysis_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ def run(self):

elif self.data_type == 'filename':
query_url = 'search?query=filename:'
query_data = self.get_param('data', None, 'Filename is missing')
query_data = '"{}"'.format(self.get_param('data', None, 'Filename is missing'))
else:
self.notSupported()

url = str(self.basic_url) + str(query_url) + str(query_data)

error = True
while error:
r = requests.get(url, headers=self.headers, auth=HTTPBasicAuth(self.api_key, self.secret), verify=False)
r = requests.get(url, headers=self.headers, auth=HTTPBasicAuth(self.api_key, self.secret), verify=True)
if "error" in r.json().get('response'):
if "Exceeded maximum API requests per minute(5)" in r.json().get('response').get('error'):
time.sleep(60)
Expand Down

0 comments on commit 7e754e1

Please sign in to comment.