ZoomEye 在去年一月开放了历史数据查询,在 ZoomEye 提供的历史数据中不管你覆盖不覆盖都可以查询出每次扫描得到的 banner 数据,但是目前提供的 ZoomEye 历史 API 只能通过 IP 去查询,而不能通过关键词匹配搜索。在 history 命令中同样如此,举个例子:
$zoomeye history 108.*.*.65 -num 3
108.*.*.65
Hostnames: [unknown]
Country: United States
City: San Jose
Organization: [unknown]
Lastupdated: 2021-02-25T01:09:26
Number of open ports: 2
Number of historical probes: 3
timestamp port/service app raw_data
2021-02-25 01:09:26 21/ftp Pure-FTPd 220---------- Welcome to Pure-...
2021-02-11 14:36:21 80/http nginx HTTP/1.1 200 OK\r\nServer: ngi...
2021-02-10 19:31:11 80/http nginx HTTP/1.1 200 OK\r\nServer: ngi...
在上述案例中我们使用
zoomeye history
搜索了 IP 是
108.*.*.65
的历史数据,
-num 3
限定展示了数据展示的数量为 3 。展示了我们认为比较重要的五个字段,分别是:
1.tiemstamp 扫描的时间
2.port 开放的端口
3.service 运行的服务
4.app 运行的应用
5.raw_data 每次扫描的 banner
现阶段
history
展示的结果只有这个五个字段,后续将根据需求添加相应字段。
$zoomeye history [-h] [-filter filed=regexp] [-force] [-num value] ip
positional arguments:
ip search historical device IP
optional arguments:
-h, --help show this help message and exit
-filter filed=regexp filter data and print raw data detail. field:
[time,port,service,country,raw,*]
-force ignore the local cache and force the data to be
obtained from the API
-num value the number of search results that should be returned
1.filter 对历史数据进行筛选,可以指定字段 (key) 也可以指定字段和值 (key=value)
2.force 强制从 API 获取数据
3.num 限定展示数据的数量
history
命令筛选功能和
search
命令的筛选功能类似,支持单独的
key
也支持
key=value
的方式,同时也是支持正则表达式的。看个例子:
$zoomeye history 108.*.*.65 -filter "time=^2020-10,port,service"
108.*.*.65
Hostnames: [unknown]
Country: United States
City: San Jose
Organization: [unknown]
Lastupdated: 2020-10-30T02:18:01
Number of open ports: 3
Number of historical probes: 5
time port service
2020-10-30 02:18:01 80 http
2020-10-12 07:17:26 80 http
2020-10-07 21:33:03 80 http
2020-10-06 06:59:48 443 https
2020-10-05 06:42:30 21 ftp
注意:
history 在查询 IP 的历史数据时会消耗用户的配额,有多少条数据就会扣除多少配额,因此我对 history 也做了缓存设置,失效日期为 5 天。
如果你需要从 API 获取实时的数据请使用
-force
参数,
-force
会强制从 ZoomEye API 获取数据,同时消耗用户配额。