github
This commit is contained in:
29
README.md
29
README.md
@@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
苦于找不到现成的, 所以自己写了一个
|
苦于找不到现成的, 所以自己写了一个
|
||||||
|
|
||||||
靶场环境使用了经典的图书管理系统稍作修改, 并增加了几处逻辑漏洞, 具体可以自己找吧!
|
靶场环境使用了经典的图书管理系统稍作修改, 并增加了几处逻辑漏洞
|
||||||
|
|
||||||
|
漏洞都很简单, 重点是对抗加解密
|
||||||
|
|
||||||
### 架构:
|
### 架构:
|
||||||
|
|
||||||
@@ -14,7 +16,21 @@
|
|||||||
|
|
||||||
注册中心: nacos
|
注册中心: nacos
|
||||||
|
|
||||||
|
网关: nginx
|
||||||
|
|
||||||
|
### 加解密方式:
|
||||||
|
|
||||||
|
默认使用的是AES-128 可以根据实际需求修改
|
||||||
|
|
||||||
|
具体的 加解密类
|
||||||
|
|
||||||
|
##### 后端 :
|
||||||
|
|
||||||
|
gateway --- utils/AESUtil
|
||||||
|
|
||||||
|
##### 前端
|
||||||
|
|
||||||
|
vue --- utils/request.js
|
||||||
|
|
||||||
### 示例:
|
### 示例:
|
||||||
|
|
||||||
@@ -26,17 +42,12 @@
|
|||||||
|
|
||||||
#### 前端:
|
#### 前端:
|
||||||
|
|
||||||
需要修改vue/src/utils/request.js 中的 baseURL: 值修改为自己的ip
|
前端已经有构建好的 在vue/html1 文件夹中, 不会构建的可以不需要构建
|
||||||
|
|
||||||
```
|
|
||||||
#最好使用windows环境
|
|
||||||
cd vue
|
|
||||||
npm install
|
|
||||||
npm run build
|
|
||||||
```
|
|
||||||
|
|
||||||
#### 后端:
|
#### 后端:
|
||||||
|
|
||||||
|
在项目根目录运行:
|
||||||
|
|
||||||
```
|
```
|
||||||
mvn clean package
|
mvn clean package
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -16,10 +16,7 @@
|
|||||||
<artifactId>spring-cloud-starter-gateway</artifactId>
|
<artifactId>spring-cloud-starter-gateway</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!--spring cloud alibaba-->
|
<!--spring cloud alibaba-->
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
|
||||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package com.demo.gateway;
|
|||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description:
|
* @Description:
|
||||||
@@ -11,7 +10,7 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
|||||||
* @Date: 2021/10/24 23:34
|
* @Date: 2021/10/24 23:34
|
||||||
*/
|
*/
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@EnableDiscoveryClient
|
|
||||||
public class GatewayApplication {
|
public class GatewayApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|||||||
@@ -4,14 +4,10 @@ server:
|
|||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: gateway-service
|
name: gateway-service
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
discovery:
|
|
||||||
server-addr: nacos:8848
|
|
||||||
gateway:
|
gateway:
|
||||||
routes:
|
routes:
|
||||||
- id: demo-one
|
- id: demo-one
|
||||||
uri: lb://library-service
|
uri: http://library:8082
|
||||||
predicates:
|
predicates:
|
||||||
- Path=/**
|
- Path=/**
|
||||||
# predicates:
|
# predicates:
|
||||||
|
|||||||
@@ -79,11 +79,7 @@
|
|||||||
<artifactId>java-jwt</artifactId>
|
<artifactId>java-jwt</artifactId>
|
||||||
<version>3.18.2</version>
|
<version>3.18.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
|
||||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
|
||||||
<version>2021.0.4.0</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|||||||
@@ -3,11 +3,10 @@ package com.example.library;
|
|||||||
import org.mybatis.spring.annotation.MapperScan;
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
|
||||||
|
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@EnableDiscoveryClient
|
|
||||||
@MapperScan("com.example.library.mapper")
|
@MapperScan("com.example.library.mapper")
|
||||||
public class LibraryApplication {
|
public class LibraryApplication {
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,5 @@ spring:
|
|||||||
application:
|
application:
|
||||||
name: library-service
|
name: library-service
|
||||||
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
discovery:
|
|
||||||
server-addr: nacos:8848
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user