Check if string exists - Procyon

Asked

Viewed 30 times

1

Well, I’m trying to make a program that reads the code of a file . class, decompile it, and check if there’s a string there. I’m using the library Procyon, but I don’t know how.

This is my code to decompile the file:

import java.io.PrintWriter;

public class Main {
    public static void main(String[] args) {
        final PrintWriter writer = new PrintWriter(System.out);
        try {
            com.strobel.decompiler.Decompiler.decompile(
                "C:\\codigo.class",
                new com.strobel.decompiler.PlainTextOutput(writer)
            );
        }
        finally {
            writer.flush();
        }
    }
}
  • Do you have to do this programmatically? It can’t be by command line?

  • Yeah, it’s gonna be like a code scanner

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.