Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Come up with a good way to make this translatable #30

Open
github-actions bot opened this issue Aug 5, 2022 · 0 comments
Open

Come up with a good way to make this translatable #30

github-actions bot opened this issue Aug 5, 2022 · 0 comments
Labels

Comments

@github-actions
Copy link

github-actions bot commented Aug 5, 2022

Come up with a good way to make this translatable

// TODO: Come up with a good way to make this translatable

            String ldcString = ldcInsnNode.cst.toString();
            AbstractInsnNode minus1 = instruction.getPrevious();
            if (normalize) {
                ldcString = ldcString.toLowerCase().trim();
            }
            String decodedString = "";
            // TODO: Move Base64 to a general deobfuscation tool
            // TODO: Properly support Base64
            if (minus1 instanceof MethodInsnNode methodInsnNode && methodInsnNode.owner.equals("java/util/Base64")) {
                decodedString = new String(Base64.getDecoder().decode(ldcInsnNode.cst.toString()));
            }
            // TODO: Come up with a good way to make this translatable
            String finalString = classNode.name + "#" + methodNode.name + ": " + ldcString + (decodedString.isBlank() ? "" : " Decoded: " + decodedString);
            String sha1Hash = "";
            if (showSha1Hash) {
                sha1Hash = DigestUtils.sha1Hex(ldcString);
            }
            if (removeDuplicateStrings) {
                if (strings.contains(finalString)) {

725daca6a1c7fd2194cc4065a044600b5b1da93c

@github-actions github-actions bot added the todo label Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

0 participants