如何在iOS / iPhone / iPad上获得WiFi加密模式? [英] How to get WiFi encryption mode on iOS/iPhone/iPad?

查看:960
本文介绍了如何在iOS / iPhone / iPad上获得WiFi加密模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在没有私有库的情况下在iOS中获得Wi-Fi加密模式?

How to get Wi-Fi encryption mode in iOS without private libraries?

推荐答案

以上答案的代码已经过了最初发布在本网站: http ://www.codeproject.com/Articles/621213/Non-Standard-Way-to-Get-Inaccessible-Data-from-iOS

The code from the answer above has been posted originally on this website: http://www.codeproject.com/Articles/621213/Non-Standard-Way-to-Get-Inaccessible-Data-from-iOS

By顺便说一句,要使这段代码工作,你需要在 #include< mach / mach.h> 中包含适当的头文件,以便你的编译器能够识别 NDR_record_t ndr

By the way, for this code to work you need to include the appropriate header files with #include <mach/mach.h> so that your compiler recognizes NDR_record_t ndr.

但是,整个设置实际上并没有返回当前WiFi的加密模式,而是AirPort的配置(上面代码中的变量 key 需要设置为 NSString * key = @Setup:/ Network / Interface / en0 / AirPort ; 之前)。我在Mac的终端中运行 $ scutil 时尝试了不同的值而不是AirPort(例如设置:/ Network / Interface / en0 / IPv4 设置:/ Network / Interface / en0 / Modem 或来自这个网站

However, this whole setup did not actually return me the encryption mode of the current WiFi, but rather the configuration of AirPort (the variable key in the code from above needs to be set to NSString *key = @"Setup:/Network/Interface/en0/AirPort"; before). I tried different values instead of AirPort which I got from running $scutil in the Terminal of my Mac (such as Setup:/Network/Interface/en0/IPv4 or Setup:/Network/Interface/en0/Modem or from this website)

希望有助于有人拥有类似的问题......

Hope that helps someone having similar issues...

这篇关于如何在iOS / iPhone / iPad上获得WiFi加密模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆