mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-23 07:21:53 +08:00
feat: support rhino and jinjava packer
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import com.google.common.collect.Maps;
|
||||
import com.hubspot.jinjava.Jinjava;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author ReaJason
|
||||
* @since 2025/1/30
|
||||
*/
|
||||
public class JinJavaServlet extends HttpServlet {
|
||||
@Override
|
||||
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
||||
String data = req.getParameter("data");
|
||||
Jinjava jnj = new Jinjava();
|
||||
Map<String, Object> context = Maps.newHashMap();
|
||||
resp.getWriter().println(jnj.render(data, context));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user