本文介绍了使用Apple80211 API时如何知道OPEN,WPA,WPA2,WEP等安全类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Cydia中的wifi扫描应用程序(例如eWifi,WiFiFoFum等)可以知道安全类型.使用Apple80211 API时,应用如何知道OPEN,WPA,WPA2,WEP等安全类型?

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?

CAPABILITIES的值是1057、1025、34、33、2、1073、1041和3121,等等...太多样化了.我不知道它代表什么.我正在使用"WEP"和"WPA_IE"键来获取NSDictionary的布尔值,但这还不够.有些访问点是OPEN,但肯定是WPA2.

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.

有人有想法吗?拜托.

推荐答案

我已经找到解决方案.看看下面.您可以使用wep,wpa,rsn执行更多详细信息.谢谢.

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";
    }
}

这篇关于使用Apple80211 API时如何知道OPEN,WPA,WPA2,WEP等安全类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 15:55