From 11168afb6940d3ec19f8948d262e5db98d5fada3 Mon Sep 17 00:00:00 2001
From: Liiuliu <992343696@qq.com>
Date: Mon, 16 Aug 2021 09:59:30 +0800
Subject: [PATCH 01/33] commit update code 0813
---
vulfocus-api/dockerapi/serializers.py | 19 ++++-
vulfocus-api/dockerapi/views.py | 27 ++++--
vulfocus-api/tasks/tasks.py | 8 +-
vulfocus-api/user/models.py | 9 +-
vulfocus-api/user/serializers.py | 43 ++++++----
vulfocus-api/user/views.py | 45 +++++++++-
vulfocus-api/vulfocus/urls.py | 3 +-
vulfocus-frontend/src/api/user.js | 9 ++
.../src/layout/components/Sidebar/index.vue | 61 +++++++++----
vulfocus-frontend/src/store/getters.js | 1 +
vulfocus-frontend/src/store/modules/user.js | 12 ++-
.../src/views/dashboard/index.vue | 62 +++++++++-----
.../src/views/register/index.vue | 85 ++++++++++++++-----
13 files changed, 287 insertions(+), 97 deletions(-)
diff --git a/vulfocus-api/dockerapi/serializers.py b/vulfocus-api/dockerapi/serializers.py
index ab37df54..768bae84 100644
--- a/vulfocus-api/dockerapi/serializers.py
+++ b/vulfocus-api/dockerapi/serializers.py
@@ -100,9 +100,21 @@ def statusck(self, obj):
time_model_id = time_moudel_data.time_id
# 排出已经删除数据 Q(docker_container_id__isnull=False), ~Q(docker_container_id=''),
data = ContainerVul.objects.all().filter(user_id=id, image_id=obj.image_id, time_model_id=time_model_id).first()
+ run_data = ""
if obj.is_docker_compose == True:
data = ContainerVul.objects.all().filter(
- Q(user_id=id) & Q(image_id=obj.image_id) & ~Q(docker_compose_path="")).first()
+ Q(user_id=id) & Q(image_id=obj.image_id) & ~Q(docker_compose_path="") &
+ Q(is_check=True) & Q(time_model_id=time_model_id)).first()
+ if data:
+ # 通过删除后再次启动的容器
+ run_data = ContainerVul.objects.all().filter(
+ Q(user_id=id) & Q(image_id=obj.image_id) & ~Q(docker_compose_path="") &
+ Q(is_check=False) & Q(time_model_id=time_model_id) & ~Q(container_status__contains="delete") ).first()
+ if run_data:
+ data = run_data
+ if not data:
+ data = ContainerVul.objects.all().filter(
+ Q(user_id=id) & Q(image_id=obj.image_id) & ~Q(docker_compose_path="")).first()
status["status"] = ""
status["is_check"] = False
status["container_id"] = ""
@@ -132,7 +144,10 @@ def statusck(self, obj):
status["start_date"] = ""
status["end_date"] = ""
status["status"] = data.container_status
- status["is_check"] = data.is_check
+ if run_data != "" and data == run_data:
+ status["is_check"] = True
+ else:
+ status["is_check"] = data.is_check
status["container_id"] = data.container_id
# 查询正在拉取镜像的任务
operation_args = {
diff --git a/vulfocus-api/dockerapi/views.py b/vulfocus-api/dockerapi/views.py
index acb0a758..933c5e2c 100644
--- a/vulfocus-api/dockerapi/views.py
+++ b/vulfocus-api/dockerapi/views.py
@@ -288,6 +288,12 @@ def get_queryset(self):
time_img_type = []
rank_range = ""
image_ids = ""
+ user_info = UserProfile.objects.filter(username=user.username).first()
+ if user_info.greenhand == True:
+ rank_range_greenhand = Q()
+ rank_range_greenhand.children.append(('rank__lte', 0.5))
+ rank_range_greenhand.children.append(('rank__gt', 0.0))
+ return ImageInfo.objects.filter(rank_range_greenhand).order_by('-create_date')
data = TimeMoudel.objects.filter(user_id=self.request.user.id, end_time__gte=now_time).first()
if data:
data_temp = TimeTemp.objects.filter(temp_id=data.temp_time_id_id).first()
@@ -843,7 +849,7 @@ def delete_container(self, request, pk=None):
container_vul = ContainerVul.objects.filter(Q(docker_container_id__isnull=False), ~Q(docker_container_id=''),
container_id=pk).first()
user_id = request.user.id
- original_container = ContainerVul.objects.filter(container_id=pk, user_id=user_id).first()
+ original_container = ContainerVul.objects.filter(container_id=pk).first()
# original_container = ContainerVul.objects.filter(Q(user_id=user_id) & Q(container_id=pk)
# & ~Q(docker_compose_path="") & ~Q(
# container_status='delete')).first()
@@ -890,7 +896,13 @@ def check_flag(self, request, pk=None):
if not container_vul.is_check:
# 更新为通过
container_vul.is_check_date = timezone.now()
- container_vul.is_check = True
+ is_compose_container = ContainerVul.objects.filter(user_id=user_id, is_check=True, time_model_id="",
+ image_id=operation_args['image_id']).first()
+ img = ImageInfo.objects.filter(image_id=operation_args['image_id']).first()
+ if is_compose_container and img.is_docker_compose == True:
+ container_vul.is_check = False
+ else:
+ container_vul.is_check = True
container_vul.save()
# 检测是否在时间模式中
now_time = datetime.datetime.now().timestamp()
@@ -898,17 +910,22 @@ def check_flag(self, request, pk=None):
if time_moudel_data:
rank = 0
time_model_id = time_moudel_data.time_id
- successful = ContainerVul.objects.filter(is_check=True, user_id=user_id,
- time_model_id=time_model_id)
+ successful = ContainerVul.objects.filter(is_check=True, user_id=user_id, time_model_id=time_model_id).values(
+ 'image_id').distinct()
rd = TimeRank.objects.filter(time_temp_id=time_moudel_data.temp_time_id_id, user_id=user_id).first()
for i in successful:
- rank += i.image_id.rank
+ img = ImageInfo.objects.filter(image_id=i['image_id']).first()
+ rank += img.rank
if rank >= rd.rank:
rd.rank = rank
rd.save()
# 停止 Docker
tasks.stop_container_task(container_vul=container_vul, user_info=user_info,
request_ip=get_request_ip(request))
+ users = UserProfile.objects.filter(id=user_id).first()
+ if users.greenhand == True:
+ users.greenhand = False
+ users.save()
return JsonResponse(R.ok())
diff --git a/vulfocus-api/tasks/tasks.py b/vulfocus-api/tasks/tasks.py
index 1e9de4c2..628d41f2 100644
--- a/vulfocus-api/tasks/tasks.py
+++ b/vulfocus-api/tasks/tasks.py
@@ -622,10 +622,9 @@ def delete_docker_compose(task_id):
user_info = UserProfile.objects.filter(id=user_id).first()
image_info = ImageInfo.objects.filter(image_name=image_name).first()
# 删除容器
- container_vul = ContainerVul.objects.filter(Q(user_id=user_id) & Q(container_id=container_id)
+ container_vul = ContainerVul.objects.filter(Q(container_id=container_id)
& ~Q(docker_compose_path="") & ~Q(container_status='delete')).first()
- msg = R.ok(msg="删除成功")
- compose_path = container_vul.docker_compose_path
+ con_user_id = container_vul.user_id
if container_vul.container_status == 'running':
compose_path = container_vul.docker_compose_path
try:
@@ -648,9 +647,10 @@ def delete_docker_compose(task_id):
container_vul.save()
except Exception:
msg = R.err(msg="删除失败,服务器内部错误")
- all_stop_container = ContainerVul.objects.filter(Q(user_id=user_id) & Q(image_id=image_info.image_id) &
+ all_stop_container = ContainerVul.objects.filter(Q(user_id=con_user_id) & Q(image_id=image_info.image_id) &
Q(container_status="stop") & Q(docker_compose_path="")).all()
if all_stop_container:
+ compose_path = container_vul.docker_compose_path
for corrtlation_container in all_stop_container:
docker_container_id = corrtlation_container.docker_container_id
try:
diff --git a/vulfocus-api/user/models.py b/vulfocus-api/user/models.py
index 6cf0d85b..8be32e24 100644
--- a/vulfocus-api/user/models.py
+++ b/vulfocus-api/user/models.py
@@ -5,7 +5,7 @@
class UserProfile(AbstractUser):
avatar = models.CharField(max_length=100, null=True, blank=True, verbose_name="头像", default="http://www.baimaohui.net/home/image/icon-anquan-logo.png")
role = models.CharField(max_length=10, default="注册用户", verbose_name="角色")
-
+ greenhand = models.BooleanField(verbose_name='用户是否首次登录', default=False)
def __str__(self):
return self.username
@@ -19,4 +19,9 @@ class EmailCode(models.Model):
class Meta:
verbose_name="验证码"
- verbose_name_plural=verbose_name
\ No newline at end of file
+ verbose_name_plural=verbose_name
+
+class RegisterCode(models.Model):
+ email = models.EmailField(null=False, blank=False, verbose_name="用户邮箱")
+ code = models.CharField(max_length=20, verbose_name="验证码")
+ add_time = models.DateTimeField(auto_now_add=True, verbose_name="添加时间")
diff --git a/vulfocus-api/user/serializers.py b/vulfocus-api/user/serializers.py
index 46d18646..9fcaec2c 100644
--- a/vulfocus-api/user/serializers.py
+++ b/vulfocus-api/user/serializers.py
@@ -1,31 +1,37 @@
from django.contrib.auth import get_user_model
from rest_framework import serializers
from rest_framework.validators import UniqueValidator
-from dockerapi.models import ContainerVul
+from dockerapi.models import ContainerVul,ImageInfo
+from dockerapi.serializers import ImageInfoSerializer
+from user.models import UserProfile, RegisterCode
import datetime
User = get_user_model()
class UserRegisterSerializer(serializers.ModelSerializer):
# 利用drf中的validators验证username是否唯一
- username = serializers.CharField(required=True, allow_blank=False,
+ username = serializers.CharField(required=True, allow_blank=False, max_length=20,
validators=[UniqueValidator(queryset=User.objects.all(), message='用户已经存在')],
- error_messages={"blank": "用户名不能为空", "required": "用户名不能为空"})
+ error_messages={"blank": "用户名不能为空", "required": "用户名不能为空",
+ "max_length": "用户名不能超过20位"})
password = serializers.CharField(
- style={"input_type": "password"},help_text="密码", label="密码", write_only=True, error_messages={"blank": "密码不能为空", "required": "密码不能为空"}
- )
- email = serializers.EmailField(required=True, allow_blank=False,
- validators=[UniqueValidator(queryset=User.objects.all(), message="该邮箱已经被注册")],
- error_messages={"blank": "邮箱不能为空", "invalid": "邮箱格式错误", "required": "邮箱不能为空"})
+ style={"input_type": "password"}, help_text="密码", label="密码", write_only=True, error_messages={"blank": "密码不能为空", "required": "密码不能为空"})
+ checkpass = serializers.CharField(style={"input_type_password"}, allow_blank=False, write_only=True)
+ code = serializers.CharField(required=True, allow_blank=False, write_only=True)
def create(self, validated_data):
- user = super(UserRegisterSerializer, self).create(validated_data= validated_data)
- user.set_password(validated_data["password"])
- user.save()
- return user
+ username = validated_data["username"]
+ password = validated_data["password"]
+ code = validated_data["code"]
+ register_code = RegisterCode.objects.filter(code=code).first()
+ user = UserProfile(username=username, email=register_code.email)
+ user.set_password(password)
+ user.save()
+ register_code.delete()
+ return user
class Meta:
model = User
- fields = ("username","password","email")
+ fields = ("username", "password", "checkpass", "code")
class UserProfileSerializer(serializers.ModelSerializer):
@@ -38,7 +44,7 @@ class UserProfileSerializer(serializers.ModelSerializer):
class Meta:
model = User
- fields = ("id", "name", "roles", "avatar", "email", "rank", "status_moudel", "rank_count", "date_joined")
+ fields = ("id", "name", "roles", "avatar", "email", "rank", "status_moudel", "rank_count", "date_joined", 'greenhand')
def transition_time(self,obj):
time = obj.date_joined.strftime('%Y-%m-%d %H:%M:%S')
@@ -53,14 +59,15 @@ def set_status_moudel(self, obj):
def rankAD(self, obj):
rank = 0
user_id = obj.id
- successful = ContainerVul.objects.filter(is_check=True, user_id=user_id, time_model_id="")
- for i in successful:
- rank += i.image_id.rank
+ successful = ContainerVul.objects.filter(is_check=True, user_id=user_id, time_model_id="").values('image_id').distinct()
+ if successful:
+ img = ImageInfo.objects.filter(image_id=i['image_id']).first()
+ rank += img.rank
return rank
def rankCount(self, obj):
user_id = obj.id
- successful = ContainerVul.objects.filter(is_check=True, user_id=user_id, time_model_id="")
+ successful = ContainerVul.objects.filter(is_check=True, user_id=user_id, time_model_id="").values('image_id').distinct()
return successful.count()
def set_role(self, obj):
diff --git a/vulfocus-api/user/views.py b/vulfocus-api/user/views.py
index 2743d932..bc09a49a 100644
--- a/vulfocus-api/user/views.py
+++ b/vulfocus-api/user/views.py
@@ -1,5 +1,6 @@
from django.core.paginator import Paginator
from django.db.models import Sum
+from django.contrib.auth.models import AnonymousUser
from django.http import JsonResponse,HttpResponse
from rest_framework import viewsets,mixins
from user.serializers import UserProfileSerializer, User, UserRegisterSerializer,UpdatePassSerializer,LoginSerializer
@@ -10,8 +11,9 @@
from django.db.models import Q
from email.header import Header
from rest_framework.decorators import action
+from rest_framework.decorators import api_view, authentication_classes, permission_classes
from django.views.generic.base import View
-from user.models import UserProfile, EmailCode
+from user.models import UserProfile, EmailCode, RegisterCode
from django.core.mail import send_mail, EmailMessage
from rest_framework import permissions
from vulfocus.settings import EMAIL_FROM
@@ -31,7 +33,7 @@
from rest_framework_jwt.utils import jwt_response_payload_handler
from rest_framework.response import Response
from datetime import datetime, timedelta
-from rest_framework_jwt.settings import api_settings
+from rest_framework_jwt.settings import api_settings
from rest_framework.views import View
from dockerapi.views import get_local_ip
@@ -72,7 +74,7 @@ class get_user_rank(APIView):
def get(self, request):
page_no = int(request.GET.get("page", 1))
- score_list = ContainerVul.objects.filter(is_check=True, time_model_id='').values('user_id').annotate(
+ score_list = ContainerVul.objects.filter(is_check=True, time_model_id='').values('image_id').distinct().values('user_id').annotate(
score=Sum("image_id__rank")).values('user_id', 'score').order_by("-score")
try:
pages = Paginator(score_list, 20)
@@ -112,6 +114,22 @@ class UserRegView(viewsets.mixins.CreateModelMixin, viewsets.GenericViewSet):
queryset = UserProfile.objects.all()
serializer_class = UserRegisterSerializer
+ def create(self, request, *args, **kwargs):
+ password = request.data.get("password", "")
+ checkpass = request.data.get("checkpass", "")
+ code = request.data.get("code", "")
+ if password != checkpass:
+ return JsonResponse({"code": 400, "msg": "两次密码输入不一致"})
+ register_code = RegisterCode.objects.filter(code=code).first()
+ if not register_code:
+ return JsonResponse({"code": 400, "msg": "验证码错误"})
+ if register_code.add_time < datetime.now()-timedelta(minutes=3):
+ return JsonResponse({"code": 400, "msg": "验证码已过期"})
+ serializer = self.get_serializer(data=request.data)
+ serializer.is_valid(raise_exception=True)
+ self.perform_create(serializer)
+ return JsonResponse({"code": 200, "msg": "注册成功"})
+
# 定义一验证码
class MyCode(View):
@@ -304,3 +322,24 @@ def get(self,request):
if email_instance.add_time <= five_minutes_ago:
return JsonResponse({"code": 400, "msg": "链接已过期"})
return JsonResponse({"code": 200, "msg": "ok"})
+
+@api_view(http_method_names=["POST"])
+@authentication_classes([])
+@permission_classes([])
+def send_register_email(request):
+ email = request.POST.get("email", "")
+ code = generate_code(6)
+ if not email:
+ return JsonResponse({"code": 400, "msg": "邮箱不能为空"})
+ if UserProfile.objects.filter(email=email).count():
+ return JsonResponse({"code": 400, "msg": "该邮箱已经被使用"})
+ if RegisterCode.objects.filter(email=email, add_time__gt=datetime.now()-timedelta(minutes=1)).count():
+ return JsonResponse({"code": 400, "msg": "距离上次发送未超过1分钟"})
+ try:
+ send_mail(subject="用户注册", from_email=EMAIL_FROM, message="您的验证码是{},有效期为三分钟".format(code),
+ recipient_list=[email])
+ register_code = RegisterCode(email=email, code=code)
+ register_code.save()
+ return JsonResponse({"code": 200, "msg": "邮件发送成功"})
+ except Exception as e:
+ return JsonResponse({"code": 400, "msg": "邮件发送失败"})
diff --git a/vulfocus-api/vulfocus/urls.py b/vulfocus-api/vulfocus/urls.py
index fe82a76b..25722865 100644
--- a/vulfocus-api/vulfocus/urls.py
+++ b/vulfocus-api/vulfocus/urls.py
@@ -16,7 +16,7 @@
from django.conf.urls import url, include
from rest_framework import routers
from dockerapi.views import ImageInfoViewSet, ContainerVulViewSet, SysLogSet, get_setting, update_setting, TimeMoudelSet, CreateTimeTemplate, UserRank, TimeRankSet,get_timing_imgs
-from user.views import UserRegView, UserSet, get_user_rank, LoginViewset, SendEmailViewset, ResetPasswordViewset, UpdatePassViewset, AccessLinkView
+from user.views import UserRegView, UserSet, get_user_rank, LoginViewset, SendEmailViewset, ResetPasswordViewset, UpdatePassViewset, AccessLinkView, send_register_email
from rest_framework_jwt.views import obtain_jwt_token
from user.views import get_user_info, LogoutView, MyCode
from tasks.views import TaskSet
@@ -60,4 +60,5 @@
url(r'^file/delete/', delete_file),
url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
url(r"accesslink",AccessLinkView.as_view()),
+ url(r'send_register_email', send_register_email),
]
\ No newline at end of file
diff --git a/vulfocus-frontend/src/api/user.js b/vulfocus-frontend/src/api/user.js
index 8cf8584a..39e74f08 100644
--- a/vulfocus-frontend/src/api/user.js
+++ b/vulfocus-frontend/src/api/user.js
@@ -93,3 +93,12 @@ export function accessCode(code) {
method: 'get',
})
}
+
+export function send_reg_mail(data) {
+ return request({
+ url: '/send_register_email/',
+ method: 'post',
+ data
+ })
+}
+
diff --git a/vulfocus-frontend/src/layout/components/Sidebar/index.vue b/vulfocus-frontend/src/layout/components/Sidebar/index.vue
index 585d01cb..dad34c0a 100644
--- a/vulfocus-frontend/src/layout/components/Sidebar/index.vue
+++ b/vulfocus-frontend/src/layout/components/Sidebar/index.vue
@@ -1,23 +1,48 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/vulfocus-frontend/src/store/getters.js b/vulfocus-frontend/src/store/getters.js
index ef059e35..c1ddf07f 100644
--- a/vulfocus-frontend/src/store/getters.js
+++ b/vulfocus-frontend/src/store/getters.js
@@ -7,6 +7,7 @@ const getters = {
name: state => state.user.name,
roles: state => state.user.roles,
email: state => state.user.email,
+ greenhand: state => state.user.greenhand,
permission_routes: state => state.permission.routes
}
export default getters
diff --git a/vulfocus-frontend/src/store/modules/user.js b/vulfocus-frontend/src/store/modules/user.js
index d84d462d..a4803f33 100644
--- a/vulfocus-frontend/src/store/modules/user.js
+++ b/vulfocus-frontend/src/store/modules/user.js
@@ -10,6 +10,7 @@ const state = {
rank:'',
email:'',
roles: [],
+ greenhand: false,
}
const mutations = {
@@ -30,7 +31,10 @@ const mutations = {
},
SET_EMAIL: (state, email) => {
state.email = email
- }
+ },
+ SET_GREENHAND: (state, greenhand) => {
+ state.greenhand = greenhand
+ },
}
const actions = {
@@ -49,9 +53,9 @@ const actions = {
})
},
register({ commit }, userInfo) {
- const { name,pass,checkPass,email} = userInfo
+ const { name,pass,checkpass,email,code} = userInfo
return new Promise((resolve, reject) => {
- register({ username: name.trim(), password: pass ,email:email}).then(response => {
+ register({ username: name.trim(), password: pass ,email:email, checkpass:checkpass, code:code}).then(response => {
resolve(response)
}).catch(error => {
reject(error)
@@ -67,7 +71,7 @@ const actions = {
if (!data) {
reject('Verification failed, please Login again.')
}
- const { name, avatar,rank, roles, email } = data
+ const { name, avatar,rank, roles, email, greenhand } = data
commit('SET_NAME', name)
commit('SET_AVATAR', avatar)
commit('SET_RANK', rank)
diff --git a/vulfocus-frontend/src/views/dashboard/index.vue b/vulfocus-frontend/src/views/dashboard/index.vue
index 58099d48..a9bc2675 100644
--- a/vulfocus-frontend/src/views/dashboard/index.vue
+++ b/vulfocus-frontend/src/views/dashboard/index.vue
@@ -57,7 +57,7 @@
查询
- 新手引导
+ 新手引导
@@ -163,6 +163,7 @@ import ViewerEditor from '@/components/ViewerEditor'
import 'codemirror/lib/codemirror.css' // codemirror
import 'tui-editor/dist/tui-editor.css' // editor ui
import 'tui-editor/dist/tui-editor-contents.css' // editor content
+import { mapGetters } from 'vuex'
import codeSyntaxHighlight from "@toast-ui/editor-plugin-code-syntax-highlight";
import hljs from "highlight.js";
import Editor from 'tui-editor'
@@ -215,6 +216,9 @@ export default {
time_img_type:"",
rank_range:0
},
+ user:{
+ greenhand:false
+ },
vul_port:{},
countlist:[],
notifications: {},
@@ -241,17 +245,28 @@ export default {
{value:"SSRF漏洞", lable:"SSRF漏洞"},
{value:"CSRF漏洞", lable:"CSRF漏洞"},
],
- loading:true
+ loading:true,
+ firstLogin:false,
};
},
created() {
this.listData(1)
this.timeData()
+ this.getUser()
},
beforeDestroy(){
Notification.closeAll()
},
-
+ computed: {
+ ...mapGetters([
+ 'name',
+ 'avatar',
+ 'roles',
+ 'rank',
+ 'email',
+ 'greenhand',
+ ])
+ },
methods:{
timeData(){
gettimetemp().then(response => {
@@ -280,6 +295,15 @@ export default {
this.listdata[i].status.delete_flag = false
}
this.loading=false
+ if (this.user.greenhand === true){
+ // this.$refs.showTips.$emit('click')
+ if (this.loading === false && this.firstLogin === false){
+ this.$nextTick(() => {
+ this.showTips()
+ this.firstLogin = true
+ });
+ }
+ }
})
},
getselectdata(){
@@ -336,6 +360,9 @@ export default {
this.writeup_date = raw_data.writeup_date
this.is_docker_compose = raw_data.is_docker_compose
this.is_flag = raw_data.is_flag
+ if (this.user.greenhand === true){
+ this.drawer=true
+ }
}else{
ContainerSTART(id).then(response=>{
let taskId = response.data["data"]
@@ -361,6 +388,9 @@ export default {
raw_data.status.container_id = container_id
this.startCon = false
this.cStatus = false
+ if (this.user.greenhand === true){
+ this.drawer=true
+ }
}else if (responseStatus === 201){
this.$message({
message: response.data["msg"],
@@ -393,6 +423,7 @@ export default {
message: "恭喜!通过",
type: "success",
})
+ this.$store.state.user.greenhand = false
this.reload()
this.centerDialogVisible = false
}else if(responseData.status === 201){
@@ -452,6 +483,7 @@ export default {
* 删除容器
*/
this.$set(raw.status, "delete_flag", true)
+ this.$set(raw.status, "stop_flag", true)
this.$forceUpdate();
ContainerDelete(container_id).then(response=>{
let taskId = response.data["data"]
@@ -553,27 +585,11 @@ export default {
allowClose:false,
});
const steps = [
- {
- element:"#first-bmh", // 这是点击触发的id
- popover:{
- title:"第一步",
- description:"开始新手引导",
- position: "bottom"
- }
- },
- {
- element:"#first-bmh2", // 这是点击触发的id
- popover:{
- title:"第二步",
- description:"点击入门镜像",
- position: "bottom"
- }
- },
{
element:"#first-bmh3", // 这是点击触发的id
popover:{
title:"第三步",
- description:"启动入门镜像,启动后可以根据访问地址旁的 ! 了解漏洞镜像",
+ description:"启动入门镜像,启动后可以点击镜像信息旁的了解漏洞镜像!成功提交flag后可以解除新手模式,查看所有漏洞环境",
position: "top"
},
},
@@ -590,6 +606,12 @@ export default {
target: document.querySelector("#first-bmh3")
});
},
+ getUser() {
+ this.user = {
+ greenhand:this.greenhand
+ }
+ }
+
},
mounted: function() {
var _this = this;
diff --git a/vulfocus-frontend/src/views/register/index.vue b/vulfocus-frontend/src/views/register/index.vue
index 804175da..e1478c51 100644
--- a/vulfocus-frontend/src/views/register/index.vue
+++ b/vulfocus-frontend/src/views/register/index.vue
@@ -1,5 +1,5 @@
-
+
-
+
-
+ {{btntxt}}
-
-
+
+
+
+
+
注册
@@ -72,7 +75,7 @@