Comments (3)
获取的镜像信息的格式换了,需要修改vulfocus-api/dockerapi/views.py文件中get_timing_imgs方法中的部分代码(出问题的可能都是docker启动的)
自己测试了一下,临时可用的解决办法,可以修改如下内容(只能解决同步镜像报错问题)
@api_view(http_method_names=["POST"])
def get_timing_imgs(request):
"""
获取官网镜像信息
"""
try:
url = "https://vulfocus.cn/api/imgs/info"
total_page = json.loads(requests.get(url, verify=False).content)['total_page']
image_names = list(ImageInfo.objects.all().values_list('image_name', flat=True))
for i in range(total_page):
res = requests.get(url + "?page=" + str(i+1), verify=False).content
req = json.loads(res)
req = req['imgs']
for item in req:
if item['image_name'] == "":
continue
if 'is_docker_compose' in item:
if item['is_docker_compose'] == True:
continue
if item['image_name'] in image_names:
if item['image_name'] == "vulfocus/vulfocus:latest":
continue
single_img = ImageInfo.objects.filter(image_name__contains=item['image_name']).first()
if single_img.image_vul_name != item['image_vul_name'] or single_img.image_vul_name == "":
single_img.image_vul_name = item['image_vul_name']
if single_img.image_desc == "":
single_img.image_desc = item['image_desc']
if single_img.rank != item['rank']:
single_img.rank = item['rank']
if single_img.degree != item['degree']:
single_img.degree = json.dumps(item['degree'])
if "writeup_date" in item and single_img.writeup_date != item['writeup_date']:
single_img.writeup_date = item['writeup_date']
single_img.save()
else:
if "writeup_date" in item:
writeup_date = item['writeup_date']
else:
writeup_date = ""
image_info = ImageInfo(image_name=item['image_name'], image_vul_name=item['image_vul_name'],
image_desc=item['image_desc'], rank=item['rank'], degree=json.dumps(item['degree']),
is_ok=False, create_date=timezone.now(), writeup_date=writeup_date,
update_date=timezone.now())
image_info.save()
return JsonResponse({"code": 200, "data": "成功"})
except Exception as e:
return JsonResponse({"code": 201, "data": e})
from vulfocus.
+1
from vulfocus.
修改项目目录下的vulfocus-api/dockerapi/views.py文件,修改get_timing_imgs函数,将vulfocus.fofa.so替换成vulfocus.io
from vulfocus.
Related Issues (20)
- 服务器宕机后,启动平台,发现场景无法停止,重启容器也无法解决 HOT 1
- 如何删除新增的普通用户?
- 关于Vulfocus场景拓扑镜像下载问题 HOT 3
- vulfocus使用docker启用后,网站正常访问,但漏洞镜像无法拉取。
- 使用docker-compose本地部署环境镜像拉取异常 HOT 4
- 无法使用管理员账户登录怎么解决?
- vulfocus/spring-cve_2020_5410:new镜像无法启动,出现BUILD FAILURE
- 内置容器镜像 dcrcms 文件上传 (CNVD-2020-27175)描述错误:
- cnvd_2015_07557 redis未授权访问靶场的问题
- 内部服务器错误 好像是TypeError: Object of type ConnectionError is not JSON serializable HOT 1
- vulfocus中的pikachu镜像的flag在哪一关啊,怎么获得
- docker启动可以更改端口吗?更改后靶机文件等系统配置全部丢失
- 注册在线靶场,邮箱发送不了 HOT 5
- 镜像管理>一键同步完成后,选择镜像点击下载,首页无镜像 HOT 3
- flag读取优化
- vulfocus为什么只能在本地访问,同一子网下我虚拟机无法访问vulfocus以及开启的靶场
- jwt密钥泄露导致越权
- (docker部署)一键同步:服务器内部错误
- solr 代码执行 (CVE-2019-12409)
- ClassCMS 文件上传 (CVE-2022-25581) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vulfocus.