api - 谷歌安全浏览 API 不返回威胁 URL
问题描述
我正在向 Google 安全浏览 API 发送请求。我相信我正确地遵循了他们的文档。我试过重新生成我的密钥。
我在下面发送请求
POST https://safebrowsing.googleapis.com/v4/threatMatches:find?key=AIxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx HTTP/1.1
User-Agent: Fiddler
Host: safebrowsing.googleapis.com
Content-Length: 511
{
"client": {
"clientId": "yourcompanyname",
"clientVersion": "1.5.2"
},
"threatInfo": {
"threatTypes": ["MALWARE", "SOCIAL_ENGINEERING"],
"platformTypes": ["WINDOWS"],
"threatEntryTypes": ["URL"],
"threatEntries": [
{"url": "http://www.urltocheck1.org/"},
{"url": "http://malware.testing.google.test"},
{"url": "http://www.urltocheck2.org/"},
{"url": "http://www.urltocheck3.com/"}
]
}
}
并返回一个空响应,这不是我对提供的 URL 的期望并遵循他们的示例。
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Date: Wed, 08 Sep 2021 15:05:59 GMT
Server: scaffolding on HTTPServer2
Cache-Control: private
X-XSS-Protection: 0
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
Accept-Ranges: none
Vary: Accept-Encoding
Content-Length: 3
{}
https://transparencyreport.google.com/safe-browsing/search?url=malware.testing.google.test
解决方案
推荐阅读
- python - python3 中的 repmat 用于 100 x 3 矩阵,没有尺寸错误。Matlab repmat 工作正常但不是 pytthon3
- python - 将投票分数总和注释到 Django 中的项目
- php - 需要获取所有登录用户作为对象关注的用户
- swift - Swift Core Data Insert 不会失败,但不会被插入
- json - 将 Pandas 数据框转换为带有结构和数组结构的 JSON 以上传到 BigQuery
- python - 在子进程运行和通信时终止子进程,这些子进程通过队列干净地通信
- python - 如何为 PyTorch 的 F.affine_grid 和 F.grid_sample 创建剪切矩阵?
- spring-kafka - 单记录卡夫卡消费者和卡夫卡批量消费者的基本区别是什么?
- c# - C# 规范是否禁止基于默认参数的类型推断?
- python - 使用轮文件安装包时出现 Python 2.7 错误