问题标签 [safe-browsing]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
javascript - 为什么 Google 的安全浏览 API 没有将我的 URL 标记为威胁?
为了防止用户在我们的 Discord 服务器上发布网络钓鱼诈骗链接,我决定使用 Google 安全浏览 API。
谷歌透明度报告(据我所知使用安全浏览 API)说该网站:
包含有害内容,包括以下网页:
- 尝试诱骗访问者分享个人信息或下载软件
但是,当通过 node-js 使用安全浏览 API 时,使用该googleapis
包,我得到该网站的以下响应(字符串化GaxiosPromise<Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesResponse>
):
这是使用以下代码片段打印的:
您可以看到data
响应对象中的部分完全是空的,通常这是matches
数组应该在的位置。
我是否使用了错误的 API?安全浏览查找 API 表示 ULR不需要规范化或编码。
safe-browsing - Safebrowsing API 上传哈希以检查可疑软件
我正在尝试发送一个哈希作为 Safebrowsing API 的有效负载,以检测文件是否可疑/恶意,但我显然无法发送正确的有效负载。
我的有效载荷:
https://developers.google.com/safe-browsing/v4/lookup-api声明我需要使用该ThreatEntry
对象(见下面的截图)
这就是threatEntry
对象应该看起来像https://developers.google.com/safe-browsing/v4/reference/rest/v4/ThreatEntry的样子。它说我只需要使用其中一个选项,所以我hash
在我的有效负载中如上所示,但这个错误被返回给我。
我究竟做错了什么?