first commit
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
This commit is contained in:
12
base/struts2/2.5.16/Dockerfile
Normal file
12
base/struts2/2.5.16/Dockerfile
Normal file
@@ -0,0 +1,12 @@
|
||||
FROM maven:3-jdk-8
|
||||
|
||||
LABEL maintainer="litch1<litch1chk@gmail.com>"
|
||||
|
||||
COPY ./ /usr/src/
|
||||
WORKDIR /usr/src
|
||||
|
||||
RUN set -ex \
|
||||
&& mvn compile jetty:help
|
||||
|
||||
EXPOSE 8080
|
||||
CMD ["mvn", "jetty:run"]
|
39
base/struts2/2.5.16/pom.xml
Normal file
39
base/struts2/2.5.16/pom.xml
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.pwntester</groupId>
|
||||
<artifactId>s2-059</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-core</artifactId>
|
||||
<version>2.5.16</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<finalName>s2-059</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-maven-plugin</artifactId>
|
||||
<version>9.4.31.v20200723</version>
|
||||
|
||||
<configuration>
|
||||
<supportedPackagings>jar</supportedPackagings>
|
||||
<scanIntervalSeconds>10</scanIntervalSeconds>
|
||||
<webApp>
|
||||
<contextPath>/</contextPath>
|
||||
</webApp>
|
||||
<httpConnector>
|
||||
<port>8080</port>
|
||||
</httpConnector>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@@ -0,0 +1,21 @@
|
||||
package org.pwntester.action;
|
||||
|
||||
import com.opensymphony.xwork2.ActionSupport;
|
||||
|
||||
public class IndexAction extends ActionSupport {
|
||||
|
||||
private String id;
|
||||
|
||||
|
||||
public String changeId(){
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
20
base/struts2/2.5.16/src/main/resources/struts.xml
Normal file
20
base/struts2/2.5.16/src/main/resources/struts.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE struts PUBLIC
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.0.dtd">
|
||||
|
||||
<struts>
|
||||
|
||||
<constant name="struts.devMode" value="false"/>
|
||||
<!--<constant name="struts.custom.i18n.resources" value="global"/>-->
|
||||
<!-- <constant name="struts.multipart.parser" value="jakarta-stream" /> -->
|
||||
<!--constant name="struts.multipart.maxSize" value="1" /-->
|
||||
|
||||
<package name="default" namespace="/" extends="struts-default">
|
||||
<default-action-ref name="index"/>
|
||||
<action name="index" class="org.pwntester.action.IndexAction" method="changeId">
|
||||
<result>index.jsp</result>
|
||||
</action>
|
||||
</package>
|
||||
|
||||
</struts>
|
14
base/struts2/2.5.16/src/main/webapp/WEB-INF/web.xml
Normal file
14
base/struts2/2.5.16/src/main/webapp/WEB-INF/web.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
|
||||
version="4.0">
|
||||
<filter>
|
||||
<filter-name>struts2</filter-name>
|
||||
<filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class>
|
||||
</filter>
|
||||
<filter-mapping>
|
||||
<filter-name>struts2</filter-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</filter-mapping>
|
||||
</web-app>
|
17
base/struts2/2.5.16/src/main/webapp/index.jsp
Normal file
17
base/struts2/2.5.16/src/main/webapp/index.jsp
Normal file
@@ -0,0 +1,17 @@
|
||||
<%@ page
|
||||
language="java"
|
||||
contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8" %>
|
||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>S2-059 demo</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<s:a id="%{id}">your input id: ${id}
|
||||
<br>has ben evaluated again in id attribute
|
||||
</s:a>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user