def cancel_rescan_file(self, resource):
""" Delete a previously scheduled scan.
Deletes a scheduled file rescan task. The file rescan api allows you to schedule periodic scans of a file,
this API call tells VirusTotal to stop rescanning a file that you have previously enqueued for recurrent
scanning.
:param resource: The md5/sha1/sha256 hash of the file whose dynamic behavioural report you want to retrieve.
:return: JSON acknowledgement. In the event that the scheduled scan deletion fails for whatever reason, the
response code will be -1.
"""
params = {'apikey': self.api_key, 'resource': resource}
try:
response = requests.post(self.base + 'rescan/delete', params=params, proxies=self.proxies)
except requests.RequestException as e:
return dict(error=e.message)
return _return_response_and_status_code(response)
评论列表
文章目录