function readWifiPasswords() {
var knownNet
=
ObjC.classes.WFKnownNetworkStore.sharedInstance();
var nets
=
knownNet.knownNetworks();
var objs
=
nets.allObjects();
var count
=
objs.count();
var result
=
[]
for
(var n
=
0
; n < count; n
+
+
) {
var networkProfile
=
objs.objectAtIndex_(n);
result.push(
{
HS20AccountName: networkProfile.HS20AccountName(),
HS20Badge: networkProfile.HS20Badge(),
isHS20Network: networkProfile.isHS20Network(),
isHS20NetworkProvisioned: networkProfile.isHS20NetworkProvisioned(),
TLSIdentity: networkProfile.TLSIdentity()
+
'',
addedDate: networkProfile.addedDate()
+
'',
adhoc: networkProfile.isAdhoc(),
autoJoinEnabled: networkProfile.isAutoJoinEnabled(),
autoLoginEnabled: networkProfile.isAutoLoginEnabled(),
bssid: networkProfile.bssid()
+
'',
canExposeIMSI: networkProfile.canExposeIMSI(),
captive: networkProfile.isCaptive(),
carPlay: networkProfile.isCarPlay(),
carPlayType: networkProfile.carPlayType(),
carPlayUUID: networkProfile.carPlayUUID(),
carrierBased: networkProfile.isCarrierBased(),
certificateChain: networkProfile.certificateChain(),
enterpriseProfile: networkProfile.enterpriseProfile(),
fetchedPassword: networkProfile.fetchedPassword(),
hidden: networkProfile.isHidden(),
lastAutoJoinDate: networkProfile.lastAutoJoinDate()
+
'',
managed: networkProfile.isManaged(),
originatorBundleIdentifier: networkProfile.originatorBundleIdentifier(),
password: networkProfile.password()
+
'',
policyUUID: networkProfile.policyUUID(),
previousPassword: networkProfile.previousPassword(),
requiresPassword: networkProfile.requiresPassword(),
scanAttributes: valueOf(networkProfile.scanAttributes()),
securityMode: networkProfile.securityMode()
+
'',
ssid: networkProfile.ssid()
+
'',
username: networkProfile.username()
+
''
}
);
}
return
result;
}