Created
May 11, 2022 12:04
-
-
Save r3ggi/378c776c3b5176d9a1cae37e68c64c31 to your computer and use it in GitHub Desktop.
Flutter keyboard cache verifier - Frida script for iOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Flutter keyboard cache verifier - Frida script for iOS | |
// Script based on https://codeshare.frida.re/@ay-kay/ios-custom-keyboard-support/ | |
function resolveAutocorrectionType(typeNr) { | |
switch (parseInt(typeNr, 10)) { | |
case 1: | |
return "UITextAutocorrectionTypeNo" | |
break; | |
case 2: | |
return "UITextAutocorrectionTypeYes" | |
break; | |
default: | |
return "UITextAutocorrectionTypeDefault" | |
} | |
} | |
function iterateInputTraits() { | |
var inputTraits = [ObjC.classes.UITextView, ObjC.classes.UITextField, ObjC.classes.FlutterTextInputView]; | |
inputTraits.forEach(function(inputTrait) { | |
ObjC.choose(inputTrait, { | |
onMatch: function(ui) { | |
console.log("-".repeat(100)); | |
console.log(ui); | |
console.log("is Editable: ", ui.isEditable()); | |
console.log("secureTextEntry: ", ui.isSecureTextEntry()); | |
console.log("autocorrectionType: " + ui.autocorrectionType() + " (" + resolveAutocorrectionType(ui.autocorrectionType()) + ")") | |
}, | |
onComplete: function() { | |
console.log("-".repeat(100)); | |
console.log("Finished searching for " + inputTrait.toString() + " elements."); | |
} | |
}); | |
}); | |
} | |
iterateInputTraits() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment