mach

How to get WiFi encryption mode on iOS/iPhone/iPad?

牧云@^-^@ 提交于 2019-12-01 17:47:23
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

Swift pointer problems with MACH_TASK_BASIC_INFO

旧巷老猫 提交于 2019-11-27 02:20:40
问题 I am trying to convert an ObjC stackoverflow answer to Swift and failing. It looks like I am passing a UnsafeMutablePointer<mach_msg_type_number_t> when I should be passing an inout mach_msg_type_number_t and I can't seem to work out my problem. From what I understand of the Swift pointer documentation (not much) these should be interchangeable..? Further info below. Here's the Objective C: struct task_basic_info info; mach_msg_type_number_t size = sizeof(info); kern_return_t kerr = task_info