def get_hashes_from_search(self, query, page=None):
""" Get the scan results for a file.
Even if you do not have a Private Mass API key that you can use, you can still automate VirusTotal Intelligence
searches pretty much in the same way that the searching for files api call works.
:param query: a VirusTotal Intelligence search string in accordance with the file search documentation .
<https://www.virustotal.com/intelligence/help/file-search/>
:param page: the next_page property of the results of a previously issued query to this API. This parameter
should not be provided if it is the very first query to the API, i.e. if we are retrieving the
first page of results.
apikey: the API key associated to a VirusTotal Community account with VirusTotal Intelligence privileges.
"""
params = {'query': query, 'apikey': self.api_key, 'page': page}
try:
response = requests.get(self.base + 'search/programmatic/', params=params, proxies=self.proxies)
except requests.RequestException as e:
return dict(error=e.message)
return response.json()['next_page'], response
评论列表
文章目录