Skip to content

[优化] 内存马注入器对接回显马 #99

@ReaJason

Description

@ReaJason

目前注入器在对接回显马时,只有 cn.hutool.extra.servlet.ServletUtil@123 类似的输出,没有可参考性。

重写注入器 toString 方法

public class Injector{

    private String error;

    public Injector() {
        try {
            List<Object> contexts = getContext();
            for (Object context : contexts) {
                Object shell = getShell(context);
                inject(context, shell);
            }
        } catch (Exception e) {
            ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
            PrintStream printStream = new PrintStream(outputStream);
            e.printStackTrace(printStream);
            error = outputStream.toString();
        }
    }

    @Override
    public String toString() {
        if (error == null) {
            return this.getClass().getName() + "-ok";
        }
        return error;
    }
}

这样对接回显马时可初步排除是否是注入阶段问题还是马本身的适配性问题

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions