From 7404ea619162c85e54c517523120c0bb1b55001f Mon Sep 17 00:00:00 2001 From: yuxin-pc Date: Sat, 7 Jun 2025 13:35:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=81=A2=E5=A4=8D=E4=B8=BAOSCM=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oscm/board/Dockerfile | 2 +- oscm/board/nginx.conf | 4 +- oscm/board/src/js/api/crawlNodeApi.js | 2 +- oscm/board/src/js/api/settingsApi.js | 2 +- oscm/board/src/main.js | 16 ++--- oscm/board/src/modules/Index.vue | 68 ++++++++----------- oscm/board/src/modules/log/LogList.vue | 2 +- oscm/board/src/modules/login.vue | 8 +-- oscm/board/src/modules/overview/Homepage.vue | 24 +++---- oscm/board/src/modules/targets/ApiList.vue | 4 +- .../src/modules/targets/ApiWebsiteSetting.vue | 4 +- .../board/src/modules/targets/WebsiteList.vue | 4 +- .../src/modules/targets/WebsiteSetting.vue | 4 +- oscm/board/vue.config.js | 6 +- 14 files changed, 70 insertions(+), 80 deletions(-) diff --git a/oscm/board/Dockerfile b/oscm/board/Dockerfile index 2b8c697..4ebc2ff 100644 --- a/oscm/board/Dockerfile +++ b/oscm/board/Dockerfile @@ -3,7 +3,7 @@ FROM nginx # 定义作者 MAINTAINER jsc # 将dist文件中的内容复制到 /usr/share/nginx/html/ 这个目录下面 -COPY dist/ /usr/share/nginx/html/secworld/ +COPY dist/ /usr/share/nginx/html/oscm/ COPY nginx.conf /etc/nginx/nginx.conf # COPY default.conf /etc/nginx/conf.d/default.conf RUN echo 'echo init ok!!' \ No newline at end of file diff --git a/oscm/board/nginx.conf b/oscm/board/nginx.conf index d2c84bc..f4ea0af 100644 --- a/oscm/board/nginx.conf +++ b/oscm/board/nginx.conf @@ -42,7 +42,7 @@ http { index index.html index.htm; } - location /secworld { + location /oscm { root /usr/share/nginx/html; index index.html index.htm; try_files $uri $uri/ oscm/index.html; @@ -50,7 +50,7 @@ http { } location /api { - proxy_pass http://secworld:8081; + proxy_pass http://oscm:8081; proxy_set_header Connection ""; proxy_http_version 1.1; proxy_set_header Host $host; diff --git a/oscm/board/src/js/api/crawlNodeApi.js b/oscm/board/src/js/api/crawlNodeApi.js index f8bb84d..43862b3 100644 --- a/oscm/board/src/js/api/crawlNodeApi.js +++ b/oscm/board/src/js/api/crawlNodeApi.js @@ -63,7 +63,7 @@ axios.interceptors.response.use( // console.log('拦截器响应成功') if (response.data.code == 401) { cookieUtil.setCookie('oscm_user', {}, 0); - window.location = '/secworld/login' + window.location = '/oscm/login' return; } return response diff --git a/oscm/board/src/js/api/settingsApi.js b/oscm/board/src/js/api/settingsApi.js index 600b593..5b2f153 100644 --- a/oscm/board/src/js/api/settingsApi.js +++ b/oscm/board/src/js/api/settingsApi.js @@ -101,7 +101,7 @@ axios.interceptors.response.use( // console.log('拦截器响应成功') if (response.data.code == 401) { cookieUtil.setCookie('oscm_user', {}, 0) - window.location = '/secworld/login' + window.location = '/oscm/login' return } return response diff --git a/oscm/board/src/main.js b/oscm/board/src/main.js index 1b48ef8..6cf3342 100644 --- a/oscm/board/src/main.js +++ b/oscm/board/src/main.js @@ -41,7 +41,7 @@ Vue.use(VueRouter) Vue.config.productionTip = false const routes = [ { - path: '/secworld', component: Index, + path: '/oscm', component: Index, children: [ {path: '', component: OverView, meta: {keepAlive: true}}, {path: 'home', component: OverView, meta: {keepAlive: true}}, @@ -69,7 +69,7 @@ const routes = [ {path: 'settings/wordBank', component: WordBankTab, meta: {keepAlive: true}} ] }, - {path: '/secworld/login', component: login} + {path: '/oscm/login', component: login} ] const router = new VueRouter({ mode: 'history', @@ -82,28 +82,28 @@ router.beforeEach((to, from, next) => { if (userInfo && userInfo.length > 0) { isLogin = true } - if (to.path === '/secworld/login') { + if (to.path === '/oscm/login') { next(); return; } if (isLogin) { next() } else { - next({path: '/secworld/login'}); + next({path: '/oscm/login'}); } // if(isLogin){ - // if(to.path == '/secworld/login'){ - // next({ path: '/secworld/' }) + // if(to.path == '/oscm/login'){ + // next({ path: '/oscm/' }) // }else{ // next() // } // }else{ - // if(to.path == '/secworld/login'){ + // if(to.path == '/oscm/login'){ // next() // }else{ - // next({ path: '/secworld/login' }) + // next({ path: '/oscm/login' }) // } // } }) diff --git a/oscm/board/src/modules/Index.vue b/oscm/board/src/modules/Index.vue index 16bf665..be9834e 100644 --- a/oscm/board/src/modules/Index.vue +++ b/oscm/board/src/modules/Index.vue @@ -14,60 +14,50 @@ style="height:100%" :router="true" > - +

- 安全运营管理平台 + 采集管理平台

- + - 云服务器 - 漏洞扫描引擎 + 云服务器 + 采集引擎 - + - 网站目标 - 社媒目标 - 高敏目标 - - + 网站 + 社交帐号 + 高敏目标 + API + - 策略模板 - 过滤配置 + 解析模板 + 过滤配置 - + - 任务管理 - 漏洞扫描 + 普通任务 + 单站点任务 - + - 扫描任务日志 - 扫描任务规则 - 元数据表格 - 元数据字典 + 运行日志 + 词库管理 + 元数据表格 + 元数据字典 - - - 资源运行管理 - - - - - 漏洞挖掘利用 - - @@ -179,7 +169,7 @@ export default { userApi.logout((response) => { this.setUserInfo({}); cookieUtil.setCookie('oscm_user', {}, 0); - this.$router.push("/secworld/login"); + this.$router.push("/oscm/login"); if (response.data.result) { console.log("out"); } @@ -188,7 +178,7 @@ export default { }, mounted: function () { if (this.user === {}) { - this.$router.push('/secworld/login'); + this.$router.push('/oscm/login'); return; } this.getUserInfo(); @@ -203,7 +193,7 @@ export default { let pathList = to.path.split('/'); let activeMenu = ''; if (pathList.length < 3 || pathList[2] === undefined || pathList[2] === '') { - activeMenu = "/secworld/overview"; + activeMenu = "/oscm/overview"; } else { activeMenu = to.path; } diff --git a/oscm/board/src/modules/log/LogList.vue b/oscm/board/src/modules/log/LogList.vue index 77a0052..30b1c65 100644 --- a/oscm/board/src/modules/log/LogList.vue +++ b/oscm/board/src/modules/log/LogList.vue @@ -247,7 +247,7 @@ export default { this.multipleSelection = val; }, viewProject(index, table) { - this.$router.push('/secworld/log/detail/' + table[index].id); + this.$router.push('/oscm/log/detail/' + table[index].id); }, jumpToScrapydLog(index, table) { logApi.getScrapydLogURL(table[index], (response) => { diff --git a/oscm/board/src/modules/login.vue b/oscm/board/src/modules/login.vue index 44f5398..48a14e9 100644 --- a/oscm/board/src/modules/login.vue +++ b/oscm/board/src/modules/login.vue @@ -2,7 +2,7 @@
-

安全运营管理平台

+

采集管理平台

@@ -55,7 +55,7 @@ export default { var result = response.data; if(result.code == 200){ cookieUtil.setCookie('oscm_user', result.content, -1) - window.location = "/secworld/" + window.location = "/oscm/" }else{ alert("登录失败") } @@ -65,7 +65,7 @@ export default { mounted(){ this.windowHeight = window.innerHeight; if(cookieUtil.getCookie('oscm_user') != {}){ - this.$router.push('/secworld/') + this.$router.push('/oscm/') } } } @@ -90,7 +90,7 @@ export default { color: #999999; } #login_form{ - background: url("/secworld/img/login.jpg"); + background: url("/oscm/img/login.jpg"); background-size: contain; } diff --git a/oscm/board/src/modules/overview/Homepage.vue b/oscm/board/src/modules/overview/Homepage.vue index c5479dd..0e5ef9c 100644 --- a/oscm/board/src/modules/overview/Homepage.vue +++ b/oscm/board/src/modules/overview/Homepage.vue @@ -6,7 +6,7 @@ -

资产管理

+

采集节点

@@ -17,7 +17,7 @@ :show-text="false" color="#e83e8c"> - 服务器在线 + 服务器在线 {{ numberStats.server.positive }} 台 @@ -28,7 +28,7 @@ :show-text="false" color="#e83e8c"> - 漏洞扫描引擎启用 + 采集引擎启用 {{ numberStats.project.positive }} 个 @@ -40,7 +40,7 @@ -

目标漏洞网站

+

监控目标

@@ -53,7 +53,7 @@ color="#e83e8c"> - 网站目标 + 网站目标 {{ numberStats.targetWebsite.positive }} 个 @@ -67,7 +67,7 @@ color="#e83e8c"> - 社媒目标 + 社交帐号 {{ numberStats.targetSocial.positive }} 个 @@ -79,7 +79,7 @@ -

漏洞扫描任务

+

采集任务

@@ -91,7 +91,7 @@ :show-text="false" color="#e83e8c"> - 任务管理 + 普通任务 {{ numberStats.taskCommon.positive }} 个 @@ -102,7 +102,7 @@ color="#e83e8c"> - 漏洞扫描 + 单站点任务 {{ numberStats.taskSingle.all }} 个 @@ -114,7 +114,7 @@ -

响应管理

+

运行日志

@@ -125,7 +125,7 @@ :show-text="false" color="#e83e8c"> - 扫描任务完成 + 采集成功率 {{ Math.floor(numberStats.log.positive / numberStats.log.all * 100) + '%' }} @@ -136,7 +136,7 @@ color="#e83e8c"> - 扫描任务日志 + 所有日志 {{ numberStats.log.all }} 条 diff --git a/oscm/board/src/modules/targets/ApiList.vue b/oscm/board/src/modules/targets/ApiList.vue index 63e6454..e3a3b2c 100644 --- a/oscm/board/src/modules/targets/ApiList.vue +++ b/oscm/board/src/modules/targets/ApiList.vue @@ -141,7 +141,7 @@ export default { }); }, add() { - this.$router.push({path: '/secworld/target/api/settings'}); + this.$router.push({path: '/oscm/target/api/settings'}); }, edit(index) { this.showCronList = true; @@ -149,7 +149,7 @@ export default { let editParam = {}; editParam.data = this.copyFormData.table[index] editParam.isEdit = true; - this.$router.push({path: '/secworld/target/api/settings', query: editParam}); + this.$router.push({path: '/oscm/target/api/settings', query: editParam}); }, deleteOne(dataBody) { MessageBox.confirm("是否删除?", "提示", { diff --git a/oscm/board/src/modules/targets/ApiWebsiteSetting.vue b/oscm/board/src/modules/targets/ApiWebsiteSetting.vue index e2b4ace..dc4b66e 100644 --- a/oscm/board/src/modules/targets/ApiWebsiteSetting.vue +++ b/oscm/board/src/modules/targets/ApiWebsiteSetting.vue @@ -226,7 +226,7 @@ export default { tempData.loginType = tempData.loginType.constructor === Array ? tempData.loginType[tempData.loginType.length - 1] : tempData.loginType; apiRulesApi.save(tempData, (response) => { if (response.data.message === 'success') { - this.$router.push({path: '/secworld/target'}); + this.$router.push({path: '/oscm/target'}); Message({ message: '保存成功', type: 'success' @@ -241,7 +241,7 @@ export default { }) }, cancelSave() { - this.$router.push({path: '/secworld/target'}) + this.$router.push({path: '/oscm/target'}) // this.$router.go(-1); } }, diff --git a/oscm/board/src/modules/targets/WebsiteList.vue b/oscm/board/src/modules/targets/WebsiteList.vue index cc2b34d..b231323 100644 --- a/oscm/board/src/modules/targets/WebsiteList.vue +++ b/oscm/board/src/modules/targets/WebsiteList.vue @@ -241,10 +241,10 @@ export default { let editParam = {}; editParam.data = this.formData; editParam.isEdit = true; - this.$router.push({path: '/secworld/target/website/settings', query: editParam}); + this.$router.push({path: '/oscm/target/website/settings', query: editParam}); }, addCrawlRule() { - this.$router.push({path: '/secworld/target/website/settings'}) + this.$router.push({path: '/oscm/target/website/settings'}) }, deleteCrawlRuleChild(index, tableData, handscope) { MessageBox.confirm("是否删除?", "提示", { diff --git a/oscm/board/src/modules/targets/WebsiteSetting.vue b/oscm/board/src/modules/targets/WebsiteSetting.vue index ed1db5e..58ed7de 100644 --- a/oscm/board/src/modules/targets/WebsiteSetting.vue +++ b/oscm/board/src/modules/targets/WebsiteSetting.vue @@ -706,7 +706,7 @@ export default { tempData.storageOption = tempData.storageOption.constructor === Array ? JSON.stringify(tempData.storageOption) : tempData.storageOption targetWebsiteApi.update(tempData, (response) => { if (response.data.code === 200) { - this.$router.push({path: '/secworld/target/website'}); + this.$router.push({path: '/oscm/target/website'}); Message({ message: '保存成功', type: 'success' @@ -721,7 +721,7 @@ export default { }) }, cancelSave() { - this.$router.push({path: '/secworld/target/website'}) + this.$router.push({path: '/oscm/target/website'}) // this.$router.go(-1); } }, diff --git a/oscm/board/vue.config.js b/oscm/board/vue.config.js index 50de5b7..9b8c4aa 100644 --- a/oscm/board/vue.config.js +++ b/oscm/board/vue.config.js @@ -1,15 +1,15 @@ module.exports = { - publicPath: '/secworld', + publicPath: '/oscm', devServer: { host: '0.0.0.0', port: 8080, // proxy: 'http://127.0.0.1:8081' - proxy: 'http://47.115.228.133:28081' + proxy: 'http://38.54.94.107:28081' }, chainWebpack: config => { config.plugin('html') .tap(args => { - args[0].title = "安全运营管理平台"; + args[0].title = "采集管理平台"; return args; }) }