-6

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.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Rick Kukiela
  • 1,135
  • 1
  • 15
  • 34
  • http://developer.android.com/training/index.html might be a good starting point –  Nov 04 '14 at 21:40
  • The project in question is not an android application, rather a java command line tool for brute forcing android keystore passwords... – Rick Kukiela Nov 04 '14 at 21:42
  • if you arenot able to do this on your own, you probably cause harm with this program. – Philipp Sander Nov 04 '14 at 21:43
  • ..... I just want to retreive the password I set on the keystore when I created it two years ago. What kind of harm do you think I'm going to cause? – Rick Kukiela Nov 04 '14 at 21:44
  • http://stackoverflow.com/questions/8459395/eclipse-import-an-existing-project then modify, then export a jar –  Nov 04 '14 at 21:52

1 Answers1

2

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");
bart
  • 2,378
  • 2
  • 19
  • 21
  • Yeah i cant get it to work IDK. I did exactly what you said, but there is no Main class only Main.java (which I right clicked on and did run as java application.) I have no run configs set up and when I try to set one up it doest find the "main class" from the project. Just some JUnit stuff that I dont know what that is... – Rick Kukiela Nov 04 '14 at 22:19
  • Also, when I try to do what you said about exporting a runnable jar, i get the following error: Jar export finished with problems. See details for additional information. Could not find main method from given launch configuration. – Rick Kukiela Nov 04 '14 at 22:20
  • Main class = Main.java – bart Nov 04 '14 at 22:31
  • Ok i was able to get to "compile" i guess but i Keep getting a bunch of run time null pointer exceptions. It might be due to lack of arguments. Im trying to find the usages and hopefully that will work – Rick Kukiela Nov 04 '14 at 22:31
  • see my updated answer, NullPointerExceptions are caused because keystore name is never set, Main does not have any support for arguments ATM – bart Nov 04 '14 at 22:35
  • You are right - and I just found more documentation on this here: http://sith.org.uk/mjolnir/gettingstarted.html you have to modify the source to point to your keystore file, it is not passed in as an argument. Thanks for helping me with this! – Rick Kukiela Nov 04 '14 at 22:42