Skip to content

Commit

Permalink
修改首页图片和task
Browse files Browse the repository at this point in the history
  • Loading branch information
xuzhiyi committed Mar 3, 2022
1 parent c933964 commit 0f02dc6
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 10 deletions.
4 changes: 2 additions & 2 deletions vulfocus-api/layout_image/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1578,7 +1578,7 @@ def download_official_website_layout(request):
data = request.data
id = data['layout_id'] # 真实官网id
user = request.user
url = "http://vulfocus.fofa.so/api/layoutinfodet?layout_id={}".format(id)
url = "http://vulfocus.io/api/layoutinfodet?layout_id={}".format(id)
res = requests.get(url, verify=False).content
req = json.loads(res)
raw_data = req['data']['layout_raw_content']
Expand Down Expand Up @@ -1820,7 +1820,7 @@ def get_official_website_layout(request):
'''
获取官网编排场景信息(社区)
'''
url = "http://vulfocus.fofa.so/api/get/layoutinfo/"
url = "http://vulfocus.io/api/get/layoutinfo/"
try:
res = requests.get(url, verify=False).content
req = json.loads(res)
Expand Down
Binary file added vulfocus-api/static/user/bmh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion vulfocus-api/tasks/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1779,11 +1779,17 @@ def synchronous_image():
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']),
degree=json.dumps(item['degree']), writeup_date=writeup_date,
is_ok=False, create_date=timezone.now(), update_date=timezone.now())
image_info.save()
page += 1
10 changes: 6 additions & 4 deletions vulfocus-api/vulfocus/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,12 @@
else:
CELERY_BROKER_URL = 'redis://%s:%s/0' % (REDIS_HOST, str(REDIS_PORT))
REDIS_POOL = redis.ConnectionPool(host=REDIS_HOST, port=int(REDIS_PORT), decode_responses=True,db=1)

REDIS_IMG = redis.Redis(host=REDIS_HOST, port=int(REDIS_PORT), db=6, decode_responses=True)
REDIS_USER_CACHE = redis.Redis(host=REDIS_HOST, port=int(REDIS_PORT), db=7, decode_responses=True)

if REDIS_PASS:
REDIS_IMG = redis.Redis(host=REDIS_HOST, port=int(REDIS_PORT), password=REDIS_PASS, db=6, decode_responses=True)
REDIS_USER_CACHE = redis.Redis(host=REDIS_HOST, port=int(REDIS_PORT), password=REDIS_PASS, db=7, decode_responses=True)
else:
REDIS_IMG = redis.Redis(host=REDIS_HOST, port=int(REDIS_PORT), db=6, decode_responses=True)
REDIS_USER_CACHE = redis.Redis(host=REDIS_HOST, port=int(REDIS_PORT), db=7, decode_responses=True)
#: Only add pickle to this list if your broker is secured
#: from unwanted access (see userguide/security.html)
CELERY_ACCEPT_CONTENT = ['json']
Expand Down
Binary file added vulfocus-frontend/src/assets/loginbg02.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion vulfocus-frontend/src/views/image/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@
if (data.code===200){
this.$message(
{
message:"同步完成",
message:"同步任务下发成功",
type:"success"
})
this.reload()
Expand Down
4 changes: 2 additions & 2 deletions vulfocus-frontend/src/views/login/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default {
redirect: undefined,
displayInput:false,
version: '',
bg: require('../../assets/loginbg02.png'),
bg: require('../../assets/loginbg02.jpg'),
logoimg: require('../../assets/logintitle.png'),
cancel_registration: true
}
Expand All @@ -119,7 +119,7 @@ export default {
let enterprise_logo = data.data['enterprise_logo']
this.cancel_registration = data.data['cancel_registration']
if (enterprise_bg){
this.bg = enterprise_bg || require('../../assets/loginbackground.png')
this.bg = enterprise_bg || require('../../assets/loginbg02.jpg')
}
if (enterprise_logo){
this.logoimg = enterprise_logo || require('../../assets/logintitle.png')
Expand Down

0 comments on commit 0f02dc6

Please sign in to comment.