通过cve编号和时间段获取热度信息。
目前支持微博、推特的爬虫检索,微博上安全相关数据量较少,推特数据量较大。
已在cve_trends.twitter_trends部署了cve_id和created_at的复合索引。
推荐dockerfile部署,目前已部署在192.168.3.203:5000。
默认使用5000端口,自行考虑防火墙端口开放,如ubuntu使用sudo ufw allow 5000/tcp放开端口;
目前连接数据库是192.168.3.203:23306,docker默认bridge模式,要访问203数据库需要sudo ufw allow 23306/tcp
如果需要指定端口映射,自行更改参数docker run -p <host-port>:<container-port> <image-name>
# 构建后大小为77.5MB
docker build -t bling-trends-server .
# 运行命令
docker run --name bling_trends_server_container -itd -p 5000:5000 bling-trends-server
已完成
http://192.168.3.38:5000/query_cve
post
{"auth":"dp23MMMsa2346G02S2","cve":"CVE-2023-22787","timescope_start":"2023-05-09 00:30:00","timescope_end":"2023-05-09 23:40:00"}
字段名 必选 类型 说明
auth 是 string 认证字符串,类似于gitlab的PAT
cve 是 string CVE编号,如CVE-2023-22787
timescope_start 是 string 起始时间,如2023-05-09 00:30:00
timescope_end 是 string 终结时间,如2023-05-09 23:40:00
{
"data": [
{
"numbers": 1,
"total": 870,
"type": "twitter"
},
{
"numbers": 0,
"total": 7,
"type": "weibo"
}
],
"meta": {
"date_end": "2023-05-09 23:40:00",
"date_start": "2023-05-09 00:30:00"
}
}
失败返回示例
{
"err": "u need provide auth key"
}