File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed
src/main/java/org/joychou Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 1111
1212### Usage
1313
14- 代码和配置做了对Tomcat的适配。生成WAR包,放到Tomcat的Webapps目录即可。
1514
16- 生成WAR包命令:
15+ 1 . 生成war包 ` mvn clean package `
16+ 2 . 将target目录的war包,cp到Tomcat的webapps目录
17+ 3 . 重启Tomcat应用
18+
1719
1820```
19- mvn clean package
21+ http://localhost:8080/java-sec-code-1.0.0/rce/exec?cmd=whoami
2022```
23+
24+ 返回
25+
26+ ```
27+ Viarus
28+ ```
Original file line number Diff line number Diff line change 55import org .springframework .boot .builder .SpringApplicationBuilder ;
66import org .springframework .boot .web .support .SpringBootServletInitializer ;
77
8+
89@ SpringBootApplication
9- public class Application extends SpringBootServletInitializer {
10+ public class Application extends SpringBootServletInitializer {
1011
1112 @ Override
1213 protected SpringApplicationBuilder configure (SpringApplicationBuilder application ) {
1314 return application .sources (Application .class );
1415 }
16+
1517 public static void main (String [] args ) throws Exception {
1618 SpringApplication .run (Application .class , args );
1719 }
18- }
1920
21+ }
You can’t perform that action at this time.
0 commit comments