How to get Wi-Fi encryption mode in iOS without private libraries?
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 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
.
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...