Search code examples
javaandroidcordovakeystore

Need help compiling this java source


So I lost my passphrase to my android keystore file and thus cannot update my application. I found a multithreaded brute force application for brute forcing the keystore (the other one available is single threaded :( )

Anyway, my app is written in cordova / phonegap. I actually do not really know the first thing about compiling java applications.

My problem is simply this, I need to compile the code found below, into an executable jar file (or some other executable format)

http://sourceforge.net/p/mjolnir-utils/git/ci/master/tree/

I was wondering if someone could explain to me how to "load" this project into eclipse so that I can compile it or if you're feeling saucy, just compile it for me and post a link to the jar file. If you are going to compile it for me, I do need to change the code in the main class from:

    // possible characters used
    char[] charset = { '!', '0', '1', '2', '3', '4', '5', '6', '7', '8',
            '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k',
            'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
            'x', 'y', 'z' };

to:

    // possible characters used
    char[] charset = { '@', '#', '$', '%', '^', '&', '*', '(', ')', '!', '0', '1', 
            '2', '3', '4', '5', '6', '7', '8',
            '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k',
            'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
            'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',
            'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
            'X', 'Y', 'Z' };

UPDATE http://sith.org.uk/mjolnir/gettingstarted.html See that site for more information. The main class has to be updated with the keystore location in order to run properly. There are no arguments passed. I am actually running it right through eclipse, no need to compile executable.


Solution

  • I was able to run the project:

    1. File->Import...->Existing Projects into Workspace
    2. Project has invalid settings - source folders are wrong. To fix that, right click on the project->Properties->Java Build Path->Source-> add src, remove src/main and src/test
    3. To run, right click on Main class->Run As->Java Application
    4. To export to jar, right click on project->Export...->Runnable JAR file

    To provide keystore name, change Main class:

    KeystoreSource source = new KeystoreSource();
    source.setKeystoreName("path_to_file_relative_to_jar_or_eclipse_project");