fix: Changed function name to avoid confusion with the same variable name

pull/322/head
chrisr3d 2019-07-22 09:53:19 +02:00
parent 729c86c336
commit 6fdfcb0a29
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ class VirusTotalParser():
vt_object.add_attribute('detection-ratio', type='text', value=detection_ratio) vt_object.add_attribute('detection-ratio', type='text', value=detection_ratio)
self.misp_event.add_object(**vt_object) self.misp_event.add_object(**vt_object)
def query_result(self, query_type): def get_query_result(self, query_type):
params = {query_type: self.attribute.value, 'apikey': self.apikey} params = {query_type: self.attribute.value, 'apikey': self.apikey}
return requests.get(self.base_url, params=params) return requests.get(self.base_url, params=params)
@ -174,7 +174,7 @@ def handler(q=False):
attribute = request['attribute'] attribute = request['attribute']
query_type, to_call = misp_type_mapping[attribute['type']] query_type, to_call = misp_type_mapping[attribute['type']]
parser = to_call(request['config']['apikey'], attribute) parser = to_call(request['config']['apikey'], attribute)
query_result = parser.query_result(query_type) query_result = parser.get_query_result(query_type)
status_code = query_result.status_code status_code = query_result.status_code
if status_code == 200: if status_code == 200:
parser.parse_report(query_result.json()) parser.parse_report(query_result.json())