gpt4 book ai didi

php - VirusTotal 服务 API 始终返回响应代码 1

转载 作者:行者123 更新时间:2023-12-01 19:10:40 26 4
gpt4 key购买 nike

我正在尝试使用 VirusTotal 扫描 URL服务 API,但始终收到 response_code = 1,即使 URL 不存在:

stdClass Object
(
[permalink] => https://www.virustotal.com/url/a92faaf82a911b2fe10ecbc51c6432f903b2a66d0686d6be0eeec78abf17cded/analysis/1348649385/
[resource] => http://www.sdfjiodsffnsdklfjksdhf.com/
[url] => http://www.sdfjiodsffnsdklfjksdhf.com/
[response_code] => 1
[scan_date] => 2012-09-26 08:49:45
[scan_id] => a92faaf82a911b2fe10ecbc51c6432f903b2a66d0686d6be0eeec78abf17cded-1348649385
[verbose_msg] => Scan request successfully queued, come back later for the report
)

但是在 above manual他们写道:

“response_code:如果您搜索的项目不存在于 VirusTotal 的数据集中,则结果将为 0。如果请求的项目仍在排队等待分析,则结果将为 -2。如果该项目确实存在并且可以检索到它将是 1。任何其他情况将在以下部分中详细说明。”

我正在使用 VirusTotalApiV2 class为此。

最佳答案

已收到支持人员的答复:

Hello,

Perhaps the documentation is not clear enough.

Whenever you send a URL for scanning, the URL might or might not be scanned in that same moment, what you are doing is you are enqueuing it for scanning. The response_code equal to one means that your enqueuing was successful and the scan will be performed as soon as possible (the API has a lower priority than the web interface).

In order to retrieve the scan results you must come back at a later time and ask for them using:

https://www.virustotal.com/documentation/public-api/#getting-url-scans

The ideal work flow would be as follows:

1) Check whether the URL was already scanned in the past using:

https://www.virustotal.com/documentation/public-api/#getting-url-scans

If it was indeed scanned and the scanning date is recent enough just use the report you just retrieved, if not go to [2].

2) Ask for a scan using:

https://www.virustotal.com/documentation/public-api/#scanning-urls

3) Wait for a while (couple of hours to be on the safe side) and ask for the report on the URL:

https://www.virustotal.com/documentation/private-api/#getting-url-scans

If it still was not scanned just wait another while and poll the API at a later time.

Hope this is clear, please do not hesitate to contact us if you still run into problems.

Regards.

关于php - VirusTotal 服务 API 始终返回响应代码 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12597981/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com