安全浏览列表
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本文档适用于以下方法:
关于列表
安全浏览列表(也称为“威胁列表”)或
简单来说,lists - 是 Google 持续更新的不安全网络资源列表。
不安全的网络资源的示例包括社交工程网站(钓鱼式攻击和欺骗性网站)和
托管恶意软件或垃圾软件的网站
列表名称
每个安全浏览列表都使用以下三种参数或类型组合来命名(已识别):
threatType
、platformType
和 threatEntryType
(请参阅
ThreatListDescriptor)。
在向安全浏览服务器发送请求之前,客户端应先检索
目前可用的安全浏览列表。这有助于确保参数或类型
指定的组合有效。
要检索安全浏览列表的名称,请使用
threatLists.list
方法和 HTTP GET
请求/响应。
示例: ThreatLists.list
HTTP GET 请求
请求仅包含标头(没有请求正文)。
请求标头包含请求网址和内容类型。请务必将
网址中 API_KEY
的 API 密钥。
GET https://safebrowsing.googleapis.com/v4/threatLists?key=API_KEY HTTP/1.1
Content-Type: application/json
请求正文
此方法没有请求正文。
HTTP GET 响应
该响应会返回当前可供查询或下载的安全浏览列表。在本课中,
例如,仅显示两个列表,但还有一些可用列表,系统会返回这些列表。
响应标头包含 HTTP 状态代码
和内容类型
HTTP/1.1 200 OK
Content-Type: application/json
响应正文
安全浏览列表会以威胁列表数组的形式返回。如上所述,每个
列表由三个参数或类型组合定义:threatType
、platformType
和
threatEntryType
。
{
threatLists: [{
"threatType": "MALWARE",
"platformType": "WINDOWS",
"threatEntryType": "URL",
}, {
"threatType": "MALWARE",
"platformType": "LINUX",
"threatEntryType": "URL",
}, {
... additional lists will be returned ...
}]
}
列出内容
目前,所有安全浏览列表都由长度介于 4 到 32 之间的可变长度 SHA 256 哈希组成
字节。这些哈希值是根据与不安全网址关联的网址的后缀/前缀表达式生成的
网络资源。请注意,网址本身不会存储在安全浏览列表中。
(请参阅网址和哈希值)。
使用 Lookup API 检查网址时,客户端在请求中发送实际网址,
安全浏览服务器会在执行检查前将网址转换为哈希值
(请参阅 Lookup API 的检查网址)。
使用 Update API 检查网址时,客户端必须将网址转换为哈希值,然后发送
请求中的哈希前缀,以便执行网址检查
(请参阅检查网址以了解 Update API)。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-10-11。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-10-11。"],[[["Google Safe Browsing maintains constantly updated lists of unsafe web resources, including phishing sites and those hosting malware."],["Each list is identified by `threatType`, `platformType`, and `threatEntryType`, which can be retrieved using the `threatLists.list` method."],["Safe Browsing lists contain SHA256 hashes derived from prefixes/suffixes of unsafe URLs, not the full URLs themselves."],["When using the Lookup API, you submit the URL directly, while the Update API requires you to pre-calculate and submit URL hashes."]]],["The document outlines methods for interacting with Google's Safe Browsing lists, which contain unsafe web resource data. To access these lists, clients use `threatLists.list` via an HTTP GET request, including an API key in the URL. The response returns an array of available threat lists, each defined by `threatType`, `platformType`, and `threatEntryType`. These lists consist of SHA256 hashes. Lookup API sends URLs, Update API sends hashed URL prefixes. The lists are available via the Lookup and Update APIs.\n"]]