Last active
September 27, 2024 21:18
-
-
Save dinosec/bf9803324bf97dc40595195c7a55cabf to your computer and use it in GitHub Desktop.
How to obtain the mobile device iOS version from a Frida JS script
This file contains hidden or 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
// How to obtain the mobile device iOS version from a Frida JS script: | |
// | |
// (c) 2020 DinoSec (www.dinosec.com) | |
if (ObjC.available) { | |
var version = iOSVersion(); | |
console.log("iOS version: " + version); | |
// return ObjC.classes.NSProcessInfo.processInfo().operatingSystemVersionString().toString(); | |
function iOSVersion() { | |
var processInfo = ObjC.classes.NSProcessInfo.processInfo(); | |
var versionString = processInfo.operatingSystemVersionString().toString(); | |
// E.g. "Version 13.5 (Build 17F75)" | |
var ver = versionString.split(' '); | |
var version = ver[1]; | |
// E.g. 13.5 | |
return version; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment