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

Dmy*_*nko 2 php validation url

我正在尝试使用VirusTotal服务API 扫描URL,但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
)
Run Code Online (Sandbox Code Playgroud)

但在上面的手册中他们写道:

"response_code:如果您搜索的项目在VirusTotal的数据集中不存在,则此结果将为0.如果请求的项目仍排队等待分析,则它将为-2.如果该项目确实存在且可以检索它将是1.以下各节详述了任何其他案件."

我正在使用VirusTotalApiV2类.

Dmy*_*nko 6

得到了支持的答复:

你好,

也许文档不够清晰.

每当您发送用于扫描的URL时,URL可能会在同一时刻被扫描,也可能不会被扫描,您正在做的是将它排入队列进行扫描.response_code等于1意味着您的队列成功并且扫描将尽快执行(API的优先级低于Web界面).

为了检索扫描结果,您必须在以后回来并使用以下方法询问它们:

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

理想的工作流程如下:

1)使用以下方法检查过去是否已扫描过URL:

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

如果它确实被扫描并且扫描日期已经足够,那么只需使用您刚刚检索到的报告,如果没有,请转到[2].

2)使用以下方式请求扫描:

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

3)等待一段时间(几个小时是安全的)并要求提供关于URL的报告:

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

如果仍然没有扫描,只需再等一下,稍后轮询API.

希望这很清楚,如果您仍遇到问题,请随时与我们联系.

问候.