This commit is contained in:
Administrator
2024-05-15 22:03:05 +08:00
parent 45ffc39311
commit 54a5c76961
7 changed files with 26 additions and 31 deletions

View File

@@ -2,7 +2,9 @@
苦于找不到现成的, 所以自己写了一个
靶场环境使用了经典的图书管理系统稍作修改, 并增加了几处逻辑漏洞, 具体可以自己找吧!
靶场环境使用了经典的图书管理系统稍作修改, 并增加了几处逻辑漏洞
漏洞都很简单, 重点是对抗加解密
### 架构:
@@ -14,7 +16,21 @@
注册中心: nacos
网关: nginx
### 加解密方式:
默认使用的是AES-128 可以根据实际需求修改
具体的 加解密类
##### 后端 :
gateway --- utils/AESUtil
##### 前端
vue --- utils/request.js
### 示例:
@@ -26,17 +42,12 @@
#### 前端:
需要修改vue/src/utils/request.js 中的 baseURL: 值修改为自己的ip
```
#最好使用windows环境
cd vue
npm install
npm run build
```
前端已经有构建好的 在vue/html1 文件夹中, 不会构建的可以不需要构建
#### 后端:
在项目根目录运行:
```
mvn clean package
```

View File

@@ -16,10 +16,7 @@
<artifactId>spring-cloud-starter-gateway</artifactId>
</dependency>
<!--spring cloud alibaba-->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>

View File

@@ -3,7 +3,6 @@ package com.demo.gateway;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
/**
* @Description:
@@ -11,7 +10,7 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
* @Date: 2021/10/24 23:34
*/
@SpringBootApplication
@EnableDiscoveryClient
public class GatewayApplication {
public static void main(String[] args) {

View File

@@ -4,14 +4,10 @@ server:
spring:
application:
name: gateway-service
cloud:
nacos:
discovery:
server-addr: nacos:8848
gateway:
routes:
- id: demo-one
uri: lb://library-service
uri: http://library:8082
predicates:
- Path=/**
# predicates:

View File

@@ -79,11 +79,7 @@
<artifactId>java-jwt</artifactId>
<version>3.18.2</version>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
<version>2021.0.4.0</version>
</dependency>
</dependencies>

View File

@@ -3,11 +3,10 @@ package com.example.library;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
@SpringBootApplication
@EnableDiscoveryClient
@MapperScan("com.example.library.mapper")
public class LibraryApplication {

View File

@@ -12,8 +12,5 @@ spring:
application:
name: library-service
cloud:
nacos:
discovery:
server-addr: nacos:8848