1. <tfoot id='stzKl'></tfoot>

    • <bdo id='stzKl'></bdo><ul id='stzKl'></ul>

    <small id='stzKl'></small><noframes id='stzKl'>

    <i id='stzKl'><tr id='stzKl'><dt id='stzKl'><q id='stzKl'><span id='stzKl'><b id='stzKl'><form id='stzKl'><ins id='stzKl'></ins><ul id='stzKl'></ul><sub id='stzKl'></sub></form><legend id='stzKl'></legend><bdo id='stzKl'><pre id='stzKl'><center id='stzKl'></center></pre></bdo></b><th id='stzKl'></th></span></q></dt></tr></i><div id='stzKl'><tfoot id='stzKl'></tfoot><dl id='stzKl'><fieldset id='stzKl'></fieldset></dl></div>

    <legend id='stzKl'><style id='stzKl'><dir id='stzKl'><q id='stzKl'></q></dir></style></legend>

    1. iOS 10.2 中的 MAC 地址

      MAC addresses in iOS 10.2(iOS 10.2 中的 MAC 地址)

          <i id='9ZzUH'><tr id='9ZzUH'><dt id='9ZzUH'><q id='9ZzUH'><span id='9ZzUH'><b id='9ZzUH'><form id='9ZzUH'><ins id='9ZzUH'></ins><ul id='9ZzUH'></ul><sub id='9ZzUH'></sub></form><legend id='9ZzUH'></legend><bdo id='9ZzUH'><pre id='9ZzUH'><center id='9ZzUH'></center></pre></bdo></b><th id='9ZzUH'></th></span></q></dt></tr></i><div id='9ZzUH'><tfoot id='9ZzUH'></tfoot><dl id='9ZzUH'><fieldset id='9ZzUH'></fieldset></dl></div>

        • <tfoot id='9ZzUH'></tfoot>
              <tbody id='9ZzUH'></tbody>
            <legend id='9ZzUH'><style id='9ZzUH'><dir id='9ZzUH'><q id='9ZzUH'></q></dir></style></legend>

              <small id='9ZzUH'></small><noframes id='9ZzUH'>

                <bdo id='9ZzUH'></bdo><ul id='9ZzUH'></ul>
                本文介绍了iOS 10.2 中的 MAC 地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                看起来从 iOS 10.2 开始,Apple 现已阻止访问所有 MAC 地址,而不仅仅是您自己的设备.

                It looks like starting with iOS 10.2, Apple has now prevented access to all MAC addresses, not just the one of your own device.

                但是,商店中的一些应用似乎仍然可以管理,例如 FingNet Analyzer.这些仍然有效,因为它们是针对旧版 SDK 编译的,还是它们有收集 MAC 地址的特殊技巧?

                However, there are some apps in the store that seem to manage that still, .e.g Fing and Net Analyzer. Are these still working because they were compiled against an older SDK or do they have special tricks to gather the MAC address?

                谁能分享一个解决方法来获取 WiFi 上 iOS 10.2 设备的 MAC 地址?

                Can anyone share a work-around to get the MAC addresses for iOS 10.2 devices on WiFi?

                推荐答案

                这只是测试代码,只是提供一个如何获取Mac地址的想法.但我相信苹果很快就会关闭这个选项.

                This is only test code, just to give an idea for how to get the Mac address. But I am sure Apple will soon close this option.

                -(void) jan_mac_addr_test:(const char*) host
                {
                    #define BUFLEN (sizeof(struct rt_msghdr) + 512)
                    #define SEQ 9999
                    #define RTM_VERSION 5   // important, version 2 does not return a mac address!
                    #define RTM_GET 0x4 // Report Metrics
                    #define RTF_LLINFO  0x400   // generated by link layer (e.g. ARP)
                    #define RTF_IFSCOPE 0x1000000 // has valid interface scope
                    #define RTA_DST 0x1 // destination sockaddr present
                    int sockfd;
                    unsigned char buf[BUFLEN];
                    unsigned char buf2[BUFLEN];
                    ssize_t n;
                    struct rt_msghdr *rtm;
                    struct sockaddr_in *sin;
                    memset(buf,0,sizeof(buf));
                    memset(buf2,0,sizeof(buf2));
                
                    sockfd = socket(AF_ROUTE, SOCK_RAW, 0);
                    rtm = (struct rt_msghdr *) buf;
                    rtm->rtm_msglen = sizeof(struct rt_msghdr) + sizeof(struct sockaddr_in);
                    rtm->rtm_version = RTM_VERSION;
                    rtm->rtm_type = RTM_GET;
                    rtm->rtm_addrs = RTA_DST;
                    rtm->rtm_flags = RTF_LLINFO;
                    rtm->rtm_pid = 1234;
                    rtm->rtm_seq = SEQ;
                
                
                    sin = (struct sockaddr_in *) (rtm + 1);
                    sin->sin_len = sizeof(struct sockaddr_in);
                    sin->sin_family = AF_INET;
                    sin->sin_addr.s_addr = inet_addr(host);
                    write(sockfd, rtm, rtm->rtm_msglen);
                
                    n = read(sockfd, buf2, BUFLEN);
                    if (n != 0) {
                        int index =  sizeof(struct rt_msghdr) + sizeof(struct sockaddr_inarp) + 8;
                        // savedata("test",buf2,n);
                        NSLog(@"IP %s ::     %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x",host,buf2[index+0], buf2[index+1], buf2[index+2], buf2[index+3], buf2[index+4], buf2[index+5]);
                
                    }
                }
                

                这篇关于iOS 10.2 中的 MAC 地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Hardware Volume buttons change in app volume(硬件音量按钮更改应用程序音量)
                Resume game cocos2d(恢复游戏 cocos2d)
                Cocos2D + Disabling only Retina iPad Graphics(Cocos2D + 仅禁用 Retina iPad 图形)
                [ios.cocos2d+box2d]how to disable auto-rotation?([ios.cocos2d+box2d]如何禁用自动旋转?)
                Storing and reading files from Documents directory iOS 5(从 Documents 目录存储和读取文件 iOS 5)
                How can I implement a virtual joystick for a cocos2d game outside the cocos2d environment?(如何在 cocos2d 环境之外实现 cocos2d 游戏的虚拟摇杆?)
                  • <i id='uDxUq'><tr id='uDxUq'><dt id='uDxUq'><q id='uDxUq'><span id='uDxUq'><b id='uDxUq'><form id='uDxUq'><ins id='uDxUq'></ins><ul id='uDxUq'></ul><sub id='uDxUq'></sub></form><legend id='uDxUq'></legend><bdo id='uDxUq'><pre id='uDxUq'><center id='uDxUq'></center></pre></bdo></b><th id='uDxUq'></th></span></q></dt></tr></i><div id='uDxUq'><tfoot id='uDxUq'></tfoot><dl id='uDxUq'><fieldset id='uDxUq'></fieldset></dl></div>
                    1. <small id='uDxUq'></small><noframes id='uDxUq'>

                      <tfoot id='uDxUq'></tfoot>
                        <tbody id='uDxUq'></tbody>

                        • <bdo id='uDxUq'></bdo><ul id='uDxUq'></ul>

                          <legend id='uDxUq'><style id='uDxUq'><dir id='uDxUq'><q id='uDxUq'></q></dir></style></legend>