fix[rule] updated check for USB restricted mode

Updated system_settings_usb_restricted_mode

issue #222
This commit is contained in:
Allen Golbig
2023-01-25 15:26:35 -05:00
parent d123ade1d0
commit 206c83f956

View File

@@ -9,8 +9,15 @@ discussion: |
====
check: |
/usr/bin/osascript -l JavaScript << EOS
$.NSUserDefaults.alloc.initWithSuiteName('com.apple.applicationaccess')\
.objectForKey('allowUSBRestrictedMode').js
function run() {
let pref1 = ObjC.unwrap($.NSUserDefaults.alloc.initWithSuiteName('com.apple.applicationaccess')\
.objectForKey('allowUSBRestrictedMode'))
if ( pref1 == false ) {
return("false")
} else {
return("true")
}
}
EOS
result:
string: "true"