-
Notifications
You must be signed in to change notification settings - Fork 53
/
SmartWordlistBenchmark.java
41 lines (33 loc) · 1.01 KB
/
SmartWordlistBenchmark.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package AndroidKeystoreBrute;
/**
*
* Beschreibung
*
* @version 1.0 vom 26.11.2011
* @author
*/
public class SmartWordlistBenchmark extends Thread {
long lastCall = 0;
int lastCount = 0;
long sleepTime = 5000L;
public void run() {
while (!SmartWordlistPasswd.found && !SmartWordlistPasswd.allPwdsTested) {
if ((System.nanoTime() - lastCall) > sleepTime * 1000000L) {
// convert string array to string
StringBuilder sb = new StringBuilder();
for (String s : SmartWordlistProducer.lastComboProduced) {
sb.append(s);
}
String lastTested = sb.toString();
System.out.printf("Current Pass: %s || est. %.0f Pass/sec%n", lastTested,
(SmartWordlistPasswd.testedPwds - lastCount) / (sleepTime * 0.001));
lastCall = System.nanoTime();
lastCount = SmartWordlistPasswd.testedPwds;
try {
Thread.sleep(sleepTime);
} catch (Exception e) {
}
}
}
}
}