views:

10

answers:

1

The wifi scanning apps like eWifi, WiFiFoFum and so on in Cydia can know the security type. How the apps know the security type like OPEN, WPA, WPA2, WEP, when using Apple80211 api?

The value of CAPABILITIES is 1057, 1025,34,33,2,1073,1041 and 3121, etc... It is too various. I don't know what it represents. I am using "WEP" and "WPA_IE" key to obtain Boolean for NSDictionary, but It is not enough. Some access points is OPEN, but it is definally WPA2.

Anyone have an ideas? Please.

+1  A: 

I have found out the solution. Have a look the below. You can do more details using the wep, wpa, rsn. Thanks.

int adhoc = [network objectForKey:@"AP_MODE"];

if (adhoc == 1) {

ret =@"AdHoc network";

} else {

id wep = [network objectForKey:@"WEP"];

id wpa = [network objectForKey:@"WPA_IE"];

id rsn = [network objectForKey:@"RSN_IE"];

if(wep) {
    ret =@"Secured network (WEP)";
} else if (wpa && rsn) {
    ret =@"Secured network (WPA, WPA2)";
} else if (wpa) {
    ret =@"Secured network (WPA)";
} else if (rsn) {
    ret =@"Secured network (WPA2)";
} else {
    ret =@"Open Network";
}

}

mooongcle