LoRexxar / comments

comments
0 stars 0 forks source link

2023/10/20/joern4/ #8

Open utterances-bot opened 9 months ago

utterances-bot commented 9 months ago

深入浅出Joern(四)不常用语法大全 · LoRexxar's Blog

https://lorexxar.cn/2023/10/20/joern4/

shadowsock5 commented 9 months ago

就是觉得语法很方便用了学习了一下joern。师傅有没有碰到过这个报错啊: java.lang.ArrayIndexOutOfBoundsException thrown on importCode,给joern提了issue他们也没修,说是soot的问题。https://github.com/joernio/joern/issues/3767

xaitx commented 7 months ago

joern> cpg.method.where(_.name("start")).l val res151: List[io.shiftleft.codepropertygraph.generated.nodes.Method] = List()

joern> cpg.method.where(_.name("codeInject")).dump val res152: List[String] = List( """ @GetMapping("/codeinject") / <=== org.joychou.controller.CommandInject.codeInject:java.lang.String(java.lang.String) / public String codeInject(String filepath) throws IOException {

    String[] cmdList = new String[]{"sh", "-c", "ls -la " + filepath};
    ProcessBuilder builder = new ProcessBuilder(cmdList);
    builder.redirectErrorStream(true);
    Process process = builder.start();
    return WebUtils.convertStreamToString(process.getInputStream());
}"""

) 奇怪我的咋搜不到

LoRexxar commented 7 months ago

joern> cpg.method.where(_.name("start")).l val res151: List[io.shiftleft.codepropertygraph.generated.nodes.Method] = List()

joern> cpg.method.where(_.name("codeInject")).dump val res152: List[String] = List( """ @GetMapping("/codeinject") / <=== org.joychou.controller.CommandInject.codeInject:java.lang.String(java.lang.String) / public String codeInject(String filepath) throws IOException {

    String[] cmdList = new String[]{"sh", "-c", "ls -la " + filepath};
    ProcessBuilder builder = new ProcessBuilder(cmdList);
    builder.redirectErrorStream(true);
    Process process = builder.start();
    return WebUtils.convertStreamToString(process.getInputStream());
}"""

) 奇怪我的咋搜不到

你发的留言挂壁了,你要不在github留言试试