Well I tried a few things:
I finally found one that gave me something close to what I needed and that was "find" lol
Basically I search for a string in "Z:\\" which is the directory I specify the container to mount to. If it returns "File not found" it does not work if it contains something else it worked.
It does work sorta... I did a test run and the password being "hello" it got the correct password but didnt get anything until about 10 passwords later.
...
hello
hell
heloh
heloe
helol
heloo
helo
hel
heohh
heohe
heohl
heoho
Password: heoho
Code:
try {
this.p = Runtime.getRuntime().exec("C:\\\\Program Files\\truecrypt\\truecrypt /s /lz /v G:\\hello.tc /p "+password+" /q");
this.p = Runtime.getRuntime().exec("find \"hello\" Z:\\\\");
this.stdError = new BufferedReader(new
InputStreamReader(p.getErrorStream()));
if(!this.stdError.readLine().equals("File not found - Z:\\\\")) {
System.out.println("Password: "+password);
System.exit(1);
}
} catch (IOException e) {
e.printStackTrace();
} catch (NullPointerException e) {
e.printStackTrace();
}
Bookmarks
Algorithms and Data Structures
Java tutorials
Algorithms Forum