查询接口
提供搜索主机、获取详细信息的方法,使开发更容易。
http://fofa.icu/api/v1/search/all
序号 | 参数 | 必填 | 类型 | 描述 | 示列 |
---|---|---|---|---|---|
1 | qbase64 | 是 | string | 经过base64编码后的查询语法,即输入的查询内容 | aXA9IjEwMy4zNS4xNjguMzgi |
2 | fields | 否 | string | 可选字段,默认host,ip,port,详见附录1 | host,ip,port |
3 | page | 否 | int | 是否翻页,默认为第一页,按照更新时间排序 | 1 |
4 | size | 否 | int | 每页查询数量,默认为100条,最大支持10,000条/页 | 100 |
5 | full | 否 | boolean | 默认搜索一年内的数据,指定为true即可搜索全部数据 | false |
6 | r_type | 否 | string | 可以指定返回json格式的数据 | json |
附录1:查询接口支持的字段,按照示例配置 fields=ip,host,port 即可。
序号 | 字段名 | 描述 |
---|---|---|
1 | ip | IP地址 |
2 | port | 端口 |
3 | protocol | 协议名 |
4 | country | 国家代码 |
5 | country_name | 国家名 |
6 | region | 区域 |
7 | city | 城市 |
8 | longitude | 地理位置 经度 |
9 | latitude | 地理位置 纬度 |
10 | asn | ASN编号 |
11 | org | ASN组织 |
12 | host | 主机名 |
13 | domain | 域名 |
14 | os | 操作系统 |
15 | server | 网站Server |
16 | icp | ICP备案号 |
17 | title | 网站标题 |
18 | jarm | JARM指纹 |
19 | header | 网站Header |
20 | banner | 协议Banner |
21 | cert | 证书 |
22 | base_protocol | 基础协议,比如TCP/UDP |
23 | link | 资产的URL链接 |
24 | cert.issuer.org | 证书颁发者组织 |
25 | cert.issuer.cn | 证书颁发者通用名称 |
26 | cert.subject.org | 证书持有者组织 |
27 | cert.subject.cn | 证书持有者通用名称 |
28 | tls.ja3s | JA3S指纹信息 |
29 | tls.version | TLS协议版本 |
30 | cert.sn | 证书的序列号 |
31 | cert.not_before | 证书生效时间 |
32 | cert.not_after | 证书到期时间 |
33 | cert.domain | 证书中的根域名 |
34 | header_hash | HTTP/HTTPS响应信息计算的Hash值 |
35 | banner_hash | 协议响应信息的完整Hash值 |
36 | banner_fid | 协议响应信息架构的指纹值 |
37 | product | 产品名 |
38 | product_category | 产品分类 |
39 | version | 版本号 |
40 | lastupdatetime | FOFA最后更新时间 |
41 | cname | 域名CNAME |
FOFA API支持cURL、Python、Java、Go语言的请求,以cURL为例:
curl -X GET "http://fofa.icu/api/v1/search/all?&key=your_key&qbase64=dGl0bGU9ImJpbmci"
响应示例:
{
"error": false, // 是否出现错误
"consumed_fpoint": 0,
"required_fpoints": 0,
"size": 244569, // 查询总数量
"page": 1, // 当前页码
"mode": "extended",
"query": "title=\"bing\"", // 查询语句
"results": [
[
"https://bingchillin.org",
"172.67.213.134",
"443"
],
[
"bingchillin.org",
"104.21.69.223",
"80"
],
[
"76.158.236.234:8080",
"76.158.236.234",
"8080"
],
[
"srkpixelsoft.com",
"43.225.55.146",
"80"
],
[
"https://srkpixelsoft.com",
"43.225.55.146",
"443"
],
[
"www.srkpixelsoft.com",
"43.225.55.146",
"80"
],
[
"https://www.srkpixelsoft.com",
"43.225.55.146",
"443"
],
[
"3.10.194.226",
"3.10.194.226",
"80"
],
[
"3.104.212.139",
"3.104.212.139",
"80"
]
]
}