OpticFusion1 / Kitsune

A program to help with reverse engineering java, vbs, batch, and html files
GNU General Public License v3.0
13 stars 2 forks source link

Skip over the instructions found via this method so the single chars don't get p... #107

Open github-actions[bot] opened 1 year ago

github-actions[bot] commented 1 year ago

Skip over the instructions found via this method so the single chars don't get printed

https://github.com/OpticFusion1/Kitsune/blob/2ca67492dabadf7415ff0ad4e06587b9fb40e48c/src/main/java/optic_fusion1/kitsune/tool/impl/StringsTool.java#L214


    private void handleMethod(ClassNode classNode, MethodNode methodNode) {
        List<String> strings = new ArrayList<>();
        for (AbstractInsnNode instruction : methodNode.instructions) {
            String string = "";
            if (instruction instanceof LdcInsnNode ldcInsnNode && ldcInsnNode.cst instanceof String) {
                string = (String) ldcInsnNode.cst;
            } else {
                // TODO: Skip over the instructions found via this method so the single chars don't get printed
                if (instruction.getOpcode() == Opcodes.BIPUSH) {
                    IntInsnNode intInsnNode = (IntInsnNode) instruction;
                    string = readStringArray(intInsnNode);
                    if (string.isBlank()) {
                        continue;
                    }
                }
            }
            if (string.isBlank()) {
                continue;
            }
            // TODO: Add decoding Base64 support. 

bcae6d26bda3fd434b0eba6c949e51175be1971c